CNDB-13417: Reduce object alloc. on brute force hybrid ann path
What is the issue
Relates to https://github.com/riptano/cndb/issues/13417 (the issue has multiple PRs)
What does this PR fix and why was it fixed
In hybrid ANN search resulting in brute force row sorting, we see many object allocations, and this creates memory pressure leading to reduced performance. This PR reduces object allocation by using jvector's NodeQueue data structure that encodes an int and a float into a long and then sorts based on the float. I also renamed the IntIntPairArray because I needed more specialized methods.
- Rename IntIntPairArray to SegmentRowIdOrdinalPairs
- CNDB-13417: Reduce object alloc. on brute force hybrid ann path
Checklist before you submit for review
- [ ] Make sure there is a PR in the CNDB project updating the Converged Cassandra version
- [ ] Use
NoSpamLoggerfor log lines that may appear frequently in the logs - [ ] Verify test results on Butler
- [ ] Test coverage for new/modified code is > 80%
- [ ] Proper code formatting
- [ ] Proper title for each commit staring with the project-issue number, like CNDB-1234
- [ ] Each commit has a meaningful description
- [ ] Each commit is not very long and contains related changes
- [ ] Renames, moves and reformatting are in distinct commits
Quality Gate passed
Issues
2 New issues
0 Accepted issues
Measures
0 Security Hotspots
95.8% Coverage on New Code
0.0% Duplication on New Code
:x: Build ds-cassandra-pr-gate/PR-1643 rejected by Butler
1 new test failure(s) in 1 builds See build details here
Found 1 new test failures
| Test | Explanation | Branch history | Upstream history |
|---|---|---|---|
| o.a.c.u.b.BinLogTest.testTruncationReleasesLogS... | regression | :red_circle: | :large_blue_circle::large_blue_circle::large_blue_circle::large_blue_circle::large_blue_circle::large_blue_circle::large_blue_circle: |
No known test failures found
@eolivelli - PTAL, thanks!