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] [Refactor] SegmentsStats#filesSizes from ImmutableOpenMap to java.util.Map #7162

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 352de4e from #7094.

…l.Map (#7094)

Using an ImmutableOpenMap in filesSizes in o.o.index.engine.SegmentsStats
is overkill since all we care about is public facing API not leaking the
filesSizes collection. This commit refactors the SegmentsStats#filesSizes
variable from an ImmutableOpenMap to an unmodifiable java.util.Map to
remove all of the unnecessary temporary object copies on the internal
map.

It also refactors the internal only used FILE_DESCRIPTIONS static variable
to an unmodifiable java.util.Map in order to completely remove SegmentsStats
dependency on hppc based ImmutableOpenMap.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
(cherry picked from commit 352de4e)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.SearchWeightedRoutingIT.testStrictWeightedRoutingWithCustomString
      1 org.opensearch.indices.replication.SegmentReplicationIT.testScrollWithOngoingSegmentReplication
      1 org.opensearch.indices.replication.SegmentReplicationIT.testReplicationPostDeleteAndForceMerge
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=pit/10_basic/Delete all}

@codecov-commenter
Copy link

Codecov Report

Merging #7162 (7e93a4d) into 2.x (69df1c2) will increase coverage by 0.06%.
The diff coverage is 75.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##                2.x    #7162      +/-   ##
============================================
+ Coverage     70.33%   70.39%   +0.06%     
- Complexity    59672    59733      +61     
============================================
  Files          4847     4847              
  Lines        287100   287085      -15     
  Branches      41709    41706       -3     
============================================
+ Hits         201922   202093     +171     
+ Misses        68245    68101     -144     
+ Partials      16933    16891      -42     
Impacted Files Coverage Δ
.../main/java/org/opensearch/index/engine/Engine.java 74.76% <40.00%> (-0.32%) ⬇️
...ava/org/opensearch/index/engine/SegmentsStats.java 72.41% <80.00%> (+1.42%) ⬆️

... and 459 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@andrross andrross merged commit 596c376 into 2.x Apr 14, 2023
@andrross andrross deleted the backport/backport-7094-to-2.x branch April 14, 2023 17:51
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.

3 participants