yuqi1129 commented on issue #12150: URL: https://github.com/apache/gravitino/issues/12150#issuecomment-5757862406
@ealeonraz Sorry for the delay. Answers: 1. **API shape**: enum, e.g. `get(ident, type, clazz, ReadMode.FRESH)`, with the existing signatures defaulting to `ReadMode.CACHED`. Greppable is the point. 2. **Refill**: a fresh read reads the backend under the cache's segment lock (`withCacheLock`) and refreshes the entry there. That is race-free with the poller's `invalidate` because both take the same lock, so no version fence is needed. Skipping the refill is also acceptable if it keeps the change smaller. 3. **Divergence**: no side effect beyond the locked refresh in (2). 4. **Call sites**: the list is a starting point; please add anything your audit finds and put the table in the PR description. #12376 lists four confirmed sites (`metalakeInUse`, `changePolicyEnabledState`, `cancelJob`, `getFileLocation`). 5. **Sequencing**: land it independently. #11961 and #12151 are merged; #12149 is closed. The `batchGet` race is being fixed separately under #12376, so you do not need to touch it. Assigned to you. -- 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]
