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] Performance improvements for BytesRefHash #9554

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 3a8bbe9 from #8788.

* Performance improvements for BytesRefHash

Signed-off-by: Ketan Verma <ketan9495@gmail.com>

* Replace BytesRefHash and clean up alternative implementations

Signed-off-by: Ketan Verma <ketan9495@gmail.com>

* Added t1ha1 to replace xxh3 hash function

Signed-off-by: Ketan Verma <ketan9495@gmail.com>

* Update t1ha1 to use unsignedMultiplyHigh on JDK 18 and above

Signed-off-by: Ketan Verma <ketan9495@gmail.com>

* Add link to the reference implementation for t1ha1

Signed-off-by: Ketan Verma <ketan9495@gmail.com>

* Annotate t1ha1 with @opensearch.internal

Signed-off-by: Ketan Verma <ketan9495@gmail.com>

* Run spotless

Signed-off-by: Ketan Verma <ketan9495@gmail.com>

* Add pre-computed hashes to speed up reinserts

Signed-off-by: Ketan Verma <ketan9495@gmail.com>

* Refactor HashFunctionTestCase

Signed-off-by: Ketan Verma <ketan9495@gmail.com>

---------

Signed-off-by: Ketan Verma <ketan9495@gmail.com>
(cherry picked from commit 3a8bbe9)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions
Copy link
Contributor

Compatibility status:

Checks if related components are compatible with change 48dd012

Incompatible components

Incompatible components: [https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/performance-analyzer.git]

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/reporting.git]

@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 Aug 25, 2023

Codecov Report

Merging #9554 (48dd012) into 2.x (c0aba88) will increase coverage by 0.12%.
Report is 2 commits behind head on 2.x.
The diff coverage is 89.43%.

@@             Coverage Diff              @@
##                2.x    #9554      +/-   ##
============================================
+ Coverage     70.78%   70.91%   +0.12%     
- Complexity    57647    57719      +72     
============================================
  Files          4768     4769       +1     
  Lines        272388   272461      +73     
  Branches      40121    40125       +4     
============================================
+ Hits         192811   193208     +397     
+ Misses        63062    62693     -369     
- Partials      16515    16560      +45     
Files Changed Coverage Δ
...g/opensearch/common/util/ReorganizingLongHash.java 93.65% <75.00%> (-1.67%) ⬇️
...rc/main/java/org/opensearch/common/hash/T1ha1.java 89.23% <89.23%> (ø)
.../java/org/opensearch/common/util/BytesRefHash.java 89.18% <89.70%> (+1.31%) ⬆️
...n/src/main/java/org/opensearch/common/Numbers.java 89.69% <100.00%> (+0.10%) ⬆️
...ggregations/bucket/terms/BytesKeyedBucketOrds.java 87.50% <100.00%> (ø)
.../aggregations/bucket/terms/SignificanceLookup.java 96.49% <100.00%> (+3.50%) ⬆️
...ations/bucket/terms/StringRareTermsAggregator.java 92.42% <100.00%> (ø)

... and 449 files with indirect coverage changes

@andrross andrross merged commit 48bcb37 into 2.x Aug 25, 2023
35 checks passed
@github-actions github-actions bot deleted the backport/backport-8788-to-2.x branch August 25, 2023 22:42
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.

2 participants