Skip to content

Conversation

@szymon-miezal
Copy link

@szymon-miezal szymon-miezal commented Feb 17, 2025

What is the issue

Memory-mapping is done in buffers of size less than 2GiB.
When these buffers aren't aligned to 4KiB and the trie-index file
spans many buffers then reading it results in going out of buffer bounds.

What does this PR fix and why was it fixed

This patch fixes it by making sure that the buffers are correctly aligned.

@github-actions
Copy link

github-actions bot commented Feb 17, 2025

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

@sonarqubecloud
Copy link

Memory-mapping is done in buffers of size less than 2GiB.
When these buffers aren't aligned to 4KiB and the trie-index file
spans many buffers then reading it results in going out of buffer bounds.
This patch fixes it by making sure that the buffers are correctly aliged.
@szymon-miezal szymon-miezal changed the title WIP: DSP-24615: Fix mapping of a partition index exceeding 2GB DSP-24615: Fix reading mmapped trie-index exceeding 2GiB Feb 18, 2025
@cassci-bot
Copy link

❌ Build ds-cassandra-pr-gate/PR-1574 rejected by Butler


1 new test failure(s) in 3 builds
See build details here


Found 1 new test failures

Test Explanation Branch history Upstream history
o.a.c.u.b.BinLogTest.testTruncationReleasesLogS... regression 🔴🔴🔵 🔵🔵🔵🔵🔵🔵🔵

Found 6 known test failures

@szymon-miezal szymon-miezal merged commit c794818 into main Feb 18, 2025
458 of 472 checks passed
@szymon-miezal szymon-miezal deleted the DSP-24615 branch February 18, 2025 11:22
szymon-miezal added a commit that referenced this pull request Feb 19, 2025
### What is the issue
Memory-mapping is done in buffers of size less than 2GiB.
When these buffers aren't aligned to 4KiB and the trie-index file
spans many buffers then reading it results in going out of buffer
bounds.

### What does this PR fix and why was it fixed
This patch fixes it by making sure that the buffers are correctly
aligned.
djatnieks pushed a commit that referenced this pull request Mar 11, 2025
Memory-mapping is done in buffers of size less than 2GiB.
When these buffers aren't aligned to 4KiB and the trie-index file
spans many buffers then reading it results in going out of buffer
bounds.

This patch fixes it by making sure that the buffers are correctly
aligned.
djatnieks pushed a commit that referenced this pull request May 18, 2025
Memory-mapping is done in buffers of size less than 2GiB.
When these buffers aren't aligned to 4KiB and the trie-index file
spans many buffers then reading it results in going out of buffer
bounds.

This patch fixes it by making sure that the buffers are correctly
aligned.
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.

4 participants