OIiveirra commented on code in PR #68726:
URL: https://github.com/apache/doris/pull/68726#discussion_r4237011110
##########
fe/fe-core/src/main/java/org/apache/doris/load/StreamLoadHandler.java:
##########
@@ -241,9 +241,17 @@ private void setDbAndTable() throws UserException,
MetaNotFoundException {
if (result != null) {
OlapTable olapTable = tables.get(0);
- result.setDbId(db.getId());
- result.setTableId(olapTable.getId());
- result.setBaseSchemaVersion(olapTable.getBaseSchemaVersion());
+ if (!olapTable.tryReadLock(timeoutMs, TimeUnit.MILLISECONDS)) {
+ throw new UserException(
+ "get table read lock timeout, database=" +
request.getDb() + ",table=" + olapTable.getName());
+ }
+ try {
+ result.setDbId(db.getId());
+ result.setTableId(olapTable.getId());
+ result.setBaseSchemaVersion(olapTable.getBaseSchemaVersion());
Review Comment:
Fixed in 85e1f4f019c. The load_sql HTTP result now reads schema version and
the related table properties under the same request-bounded timed table read
lock, released in finally. Added HTTP-path tests for lock ownership at the
schema-version read and release on exceptions.
HttpStreamLoadTablePropertiesTest, StreamLoadHandlerTest and
FederationBackendPolicyTest pass 18 tests; Maven Checkstyle passes.
--
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]