github-actions[bot] commented on code in PR #68726:
URL: https://github.com/apache/doris/pull/68726#discussion_r4244972201
##########
fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java:
##########
@@ -3185,6 +3185,27 @@ private HttpStreamParams
initHttpStreamPlan(TStreamLoadPutRequest request, Conne
return httpStreamParams;
}
+ private void setHttpStreamLoadTableProperties(TStreamLoadPutRequest
request,
+ HttpStreamParams httpStreamParams, TStreamLoadPutResult result)
throws UserException {
+ OlapTable table = (OlapTable) httpStreamParams.getTable();
+ long timeoutMs = request.isSetThriftRpcTimeoutMs() ?
request.getThriftRpcTimeoutMs() : 5000;
+ if (!table.tryReadLock(timeoutMs, TimeUnit.MILLISECONDS)) {
Review Comment:
[P2] Abort the HTTP insert transaction if this new lock times out. For a
normal `load_sql` stream load, `initHttpStreamPlan()` has already called
`InsertIntoTableCommand.initPlan()`, which begins the FE transaction before
this read-lock attempt. A schema-change writer can hold the table lock past the
timeout, causing this method to return an error without aborting that
transaction. `HttpStreamAction::process_put` returns on the failed plan status
before it copies the transaction ID, so its rollback path does not abort the
transaction. A retry with the same explicit label then fails until the stranded
PREPARE transaction times out. Please keep ownership of the begun transaction
through this metadata read and abort it on failure, with a forced-lock-timeout
test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]