Skip to content

CNDB-14773: avoid Int2IntHashMap overflow in RAMStringIndexer and improve memory track to include array memory usage #1885

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

Merged
merged 3 commits into from
Jul 22, 2025

Conversation

jasonstack
Copy link

What is the issue

#14773: Int2IntHashMap overflow when num of docs reaches 348_966_081

What does this PR fix and why was it fixed

Trigger segment flush before overflow and include array memory usage to avoid undercounting memory usage

Copy link

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
  • All new files should contain the DataStax copyright header instead of the Apache License one

Copy link

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

it would be better to enable the unit test, maybe by overriding the value of MAX_DOC_LENGTHS to a smaller value ? (we can override final static fields in unit tests, we should have the tools to do it)

Copy link

@cassci-bot
Copy link

✔️ Build ds-cassandra-pr-gate/PR-1885 approved by Butler


Approved by Butler
See build details here

Copy link

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@jasonstack jasonstack merged commit 448841b into main Jul 22, 2025
492 checks passed
@jasonstack jasonstack deleted the cndb-14773-main branch July 22, 2025 06:20
driftx pushed a commit that referenced this pull request Jul 24, 2025
…rove memory track to include array memory usage (#1885)

### What is the issue
#14773: Int2IntHashMap overflow when num of docs reaches 348_966_081

### What does this PR fix and why was it fixed

Trigger segment flush before overflow and include array memory usage to
avoid undercounting memory usage
driftx pushed a commit that referenced this pull request Jul 25, 2025
…rove memory track to include array memory usage (#1885)

### What is the issue
#14773: Int2IntHashMap overflow when num of docs reaches 348_966_081

### What does this PR fix and why was it fixed

Trigger segment flush before overflow and include array memory usage to
avoid undercounting memory usage
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