morningman commented on a change in pull request #3948:
URL: https://github.com/apache/incubator-doris/pull/3948#discussion_r446148743
##########
File path: gensrc/thrift/FrontendService.thrift
##########
@@ -600,6 +601,7 @@ struct TLoadTxnCommitRequest {
9: optional list<Types.TTabletCommitInfo> commitInfos
10: optional i64 auth_code
11: optional TTxnCommitAttachment txnCommitAttachment
+ 12: required i64 thrift_rpc_timeout_ms
Review comment:
new fields should be `optional`, for compatibility.
And it need to be checked `isset` when use it.
##########
File path: gensrc/thrift/FrontendService.thrift
##########
@@ -550,6 +550,7 @@ struct TStreamLoadPutRequest {
22: optional bool isTempPartition
23: optional bool strip_outer_array
24: optional string jsonpaths
+ 25: required i64 thrift_rpc_timeout_ms
Review comment:
optional
##########
File path:
fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
##########
@@ -185,7 +186,9 @@ public boolean commitAndPublishTransaction(Database db,
long transactionId,
List<TabletCommitInfo> tabletCommitInfos, long timeoutMillis,
TxnCommitAttachment txnCommitAttachment)
throws UserException {
- db.writeLock();
+ if (!db.tryWriteLock(timeoutMillis, TimeUnit.MILLISECONDS)) {
+ throw new UserException("get database read lock timeout,
database=" + db.getFullName());
Review comment:
```suggestion
throw new UserException("get database write lock timeout,
database=" + db.getFullName());
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]