cassandra icon indicating copy to clipboard operation
cassandra copied to clipboard

CNDB-13417: Reduce object alloc. on brute force hybrid ann path

Open michaeljmarshall opened this issue 9 months ago • 4 comments

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

michaeljmarshall avatar Mar 20 '25 22:03 michaeljmarshall

Checklist before you submit for review

  • [ ] Make sure there is a PR in the CNDB project updating the Converged Cassandra version
  • [ ] Use NoSpamLogger for 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

github-actions[bot] avatar Mar 20 '25 22:03 github-actions[bot]

: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

cassci-bot avatar Mar 21 '25 03:03 cassci-bot

@eolivelli - PTAL, thanks!

michaeljmarshall avatar Mar 31 '25 19:03 michaeljmarshall