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

Immediately remove filter cache entries on cache clear #8289

Closed

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Oct 30, 2014

Previously we had a more complex listing where we added each reader key to the list of keys cleaned intermittently by IndicesFilterCache.ReaderCleaner.run(), but because every entry is being invalidated due to the cache clear, we should immediately clear them and clean up the cache.

This also moves the periodic cleaning rescheduling into a finally block so an exception does not prevent the cleanup from being rescheduled.

Fixes #8285

This ensures that the job is still rescheduled in the event that it was
rejected from the threadpool, or an exception occured while cleaning
@dakrone dakrone changed the title Immediately removed filter cache entries on cache clear Immediately remove filter cache entries on cache clear Oct 30, 2014
}
indicesFilterCache.addReaderKeyToClean(readerKey);
}
seenReaders.clear();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can get a race here stuff that is in seen readers but not in the cache or so?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can, going to close this PR until we come up with a better solution.

@dakrone dakrone closed this Nov 3, 2014
@dakrone dakrone deleted the 8285-immediately-clear-filter-cache branch December 12, 2014 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Immediately clear the filter cache when requested
3 participants