Yingyi Bu has posted comments on this change.
Change subject: ASTERIXDB-1945 [STO] Cleanup Buffer Cache API
......................................................................
Patch Set 16:
I think we probably don't want thread-safety for FileMapManager at all, since
the call sites anyway has to orchestrate multiple steps and make sure the
bigger block is synchronized:
E.g. BufferCache.openFile(...):
synchronized (fileInfoMap) {
if (fileMapManager.isMapped(fileRef)) {
fileId = fileMapManager.lookupFileId(fileRef);
} else {
fileId = fileMapManager.registerFile(fileRef);
}
openFile(fileId);
}
return fileId;
Even if FileMapManager is thread-safe, it doesn't help and you still have to
synchronized on the big block to make sure atomicity of the sequence of
isMapped/lookup/register. Most call sites have a similar pattern. Thoughts?
--
To view, visit https://asterix-gerrit.ics.uci.edu/1840
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I15565b07afdc94ac74c608bfe4480fa09dcf8f1c
Gerrit-PatchSet: 16
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <[email protected]>
Gerrit-Reviewer: Ian Maxon <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>
Gerrit-HasComments: No