-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement cache refresh after file changed #22750
Conversation
8526eba
to
a33e020
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@beinan Thanks for the fix!
throws IOException | ||
{ | ||
if (!cachingEnabled) { | ||
return fileSystem; | ||
} | ||
|
||
checkState(cacheType != null); | ||
checkState(cacheConfig.getCacheType() != null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Do you also want to check whether cacheConfig
is null or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, just fixed it
Re-running the failed test. |
@beinan Why don't we do this by default? So, we do not encounter such staleless problems at all. |
a33e020
to
c745af4
Compare
@zacw7 do you also want to take a look at this PR? The change is behind a newly added flag which is disabled by default, so I think there should be no impact on Meta's production. |
Good question @nmahadevuni! I make this not enabled by default just because it will invalidate all your data cached which might make the cache hit rate drop to zero. Some of the local cache users such Meta they really have a very high SLA, I just want to give them a chance to change the configuration explicitly once they are ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the fix!
c745af4
to
08ea0bf
Compare
force push to rerun the test |
fix issue #22019