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

[Backport 2.x] Remove LinkedDeque and replace with LinkedHashMap, Add filecache support in clear indices cache API #7595

Merged
merged 2 commits into from
May 17, 2023

Conversation

kotwanikunal
Copy link
Member

Description

Related Issues

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…#6968)

* Remove LinkedDeque and replace with LinkedHashMap

After the recent changes the usage of the LinkedDeque fits quite well
with the insertion order semantics of LinkedHashMap, which also allows
for constant time additions and removals.

Signed-off-by: Andrew Ross <[email protected]>

* Use class member reference now that lock is final

Signed-off-by: Andrew Ross <[email protected]>

---------

Signed-off-by: Andrew Ross <[email protected]>
(cherry picked from commit 65443ad)
…7498)

Signed-off-by: Kunal Kotwani <[email protected]>
(cherry picked from commit a1e42b1)
Signed-off-by: Kunal Kotwani <[email protected]>
@kotwanikunal
Copy link
Member Author

Post merge follow up: #7596

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Merging #7595 (5603469) into 2.x (6c54504) will decrease coverage by 0.03%.
The diff coverage is 76.31%.

@@             Coverage Diff              @@
##                2.x    #7595      +/-   ##
============================================
- Coverage     70.17%   70.15%   -0.03%     
+ Complexity    59887    59829      -58     
============================================
  Files          4882     4882              
  Lines        288451   288328     -123     
  Branches      41931    41926       -5     
============================================
- Hits         202427   202269     -158     
- Misses        69045    69096      +51     
+ Partials      16979    16963      -16     
Impacted Files Coverage Δ
...s/cache/clear/ClearIndicesCacheRequestBuilder.java 16.66% <0.00%> (-3.34%) ⬇️
.../indices/cache/clear/ClearIndicesCacheRequest.java 55.26% <50.00%> (-1.41%) ⬇️
.../cache/clear/TransportClearIndicesCacheAction.java 72.72% <66.66%> (+41.47%) ⬆️
...earch/index/store/remote/utils/cache/LRUCache.java 91.87% <92.85%> (-0.26%) ⬇️
...rg/opensearch/client/IndicesRequestConverters.java 71.03% <100.00%> (+0.63%) ⬆️
...search/index/store/remote/filecache/FileCache.java 72.05% <100.00%> (+0.41%) ⬆️
...ndex/store/remote/utils/cache/RefCountedCache.java 100.00% <100.00%> (ø)
...index/store/remote/utils/cache/SegmentedCache.java 88.46% <100.00%> (+0.46%) ⬆️
...ion/admin/indices/RestClearIndicesCacheAction.java 60.00% <100.00%> (+2.85%) ⬆️

... and 486 files with indirect coverage changes

@reta reta merged commit 7c744cb into opensearch-project:2.x May 17, 2023
@kotwanikunal kotwanikunal deleted the backport-7498 branch May 22, 2023 17:11
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.

3 participants