yabola commented on code in PR #5327:
URL: https://github.com/apache/iceberg/pull/5327#discussion_r933703037
##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -345,6 +345,30 @@ protected void doCommit(TableMetadata base, TableMetadata
metadata) {
"Committed to table {} with the new metadata location {}", fullName,
newMetadataLocation);
}
+ @Override
+ public void reset(String metadataFileLocation) {
+ Optional<Long> lockId = Optional.empty();
+ ReentrantLock tableLevelMutex = commitLockCache.get(fullName, t -> new
ReentrantLock(true));
+ tableLevelMutex.lock();
+ try {
+ lockId = Optional.of(acquireLock());
+ Table tbl = loadHmsTable();
Review Comment:
I want to abstract this part of the locking logic, let me think about it~
--
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]