duongkame commented on code in PR #4156:
URL: https://github.com/apache/ozone/pull/4156#discussion_r1066133897
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequestWithFSO.java:
##########
@@ -193,7 +193,7 @@ public OMClientResponse validateAndUpdateCache(OzoneManager
ozoneManager,
}
// Add to cache of open key table and key table.
- OMFileRequest.addOpenFileTableCacheEntry(omMetadataManager, dbFileKey,
+ OMFileRequest.addOpenFileTableCacheEntry(omMetadataManager,
dbOpenFileKey,
Review Comment:
Nice catch.
So, what happens is when an FSO key is committed, the open-key entry is not
cleaned up. Logically, that should prevent the key from being reopened, e.g.
for a overwrite.
Fortunately (or maybe not), when OM opens a key for writing, it just doesn't
care if the file has been opened already (even by the same client). I feel like
this behavior results in some funny scenarios when multiple clients open and
commit the same file. Guess it's something we can think about.
--
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]