Skip to content
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

Merged
merged 1 commit into from
May 19, 2024

Conversation

beinan
Copy link
Member

@beinan beinan commented May 15, 2024

fix issue #22019

== NO RELEASE NOTE ==

ChunxuTang
ChunxuTang previously approved these changes May 15, 2024
Copy link
Member

@ChunxuTang ChunxuTang left a 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);
Copy link
Member

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?

Copy link
Member Author

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

@ChunxuTang
Copy link
Member

Re-running the failed test.

@nmahadevuni
Copy link
Member

@beinan Why don't we do this by default? So, we do not encounter such staleless problems at all.

@beinan
Copy link
Member Author

beinan commented May 15, 2024

@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.

@beinan
Copy link
Member Author

beinan commented May 15, 2024

@beinan Why don't we do this by default? So, we do not encounter such staleless problems at all.

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.

@tdcmeehan tdcmeehan requested a review from zacw7 May 17, 2024 13:55
Copy link
Member

@zacw7 zacw7 left a 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!

@beinan
Copy link
Member Author

beinan commented May 19, 2024

force push to rerun the test

@beinan beinan merged commit 665f62b into prestodb:master May 19, 2024
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants