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

Enhancements to IndicesQueryCache. (#39099) #40445

Merged
merged 1 commit into from
Mar 26, 2019

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Mar 26, 2019

This commit adds the following:

  • more tests to IndicesServiceCloseTests, one of them found a bug in the order
    in which IndicesQueryCache#onClose and
    IndicesService.indicesRefCount#decRef are called.
  • made IndicesQueryCache.stats2 a synchronized map. All writes to it are
    already protected by the lock of the Lucene cache, but the final read from
    an assertion in IndicesQueryCache#close() was not so this change should
    avoid any potential visibility issues.
  • human-readable toStrings to make debugging easier.

Relates #37117

This commit adds the following:
 - more tests to IndicesServiceCloseTests, one of them found a bug in the order
   in which `IndicesQueryCache#onClose` and
   `IndicesService.indicesRefCount#decRef` are called.
 - made `IndicesQueryCache.stats2` a synchronized map. All writes to it are
   already protected by the lock of the Lucene cache, but the final read from
   an assertion in `IndicesQueryCache#close()` was not so this change should
   avoid any potential visibility issues.
 - human-readable `toString`s to make debugging easier.

Relates elastic#37117
@jpountz jpountz merged commit 3ea8e21 into elastic:7.0 Mar 26, 2019
@jpountz jpountz deleted the backport/39099/7.0 branch March 26, 2019 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant