Skip to content

Fix incorrect data file length for early open sstables #4114

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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

blambov
Copy link
Contributor

@blambov blambov commented Apr 24, 2025

CASSANDRA-20592

Thanks for sending a pull request! Here are some tips if you're new here:

  • Ensure you have added or run the appropriate tests for your PR.
  • Be sure to keep the PR description updated to reflect all changes.
  • Write your PR title to summarize what this PR proposes.
  • If possible, provide a concise example to reproduce the issue for a faster review.
  • Read our contributor guidelines
  • If you're making a documentation change, see our guide to documentation contribution

Commit messages should follow the following format:

patch by Branimir Lambov; reviewed by TBD for CASSANDRA-20592
@VisibleForTesting
public int sizeOfFile(String filePath)
{
return (int) cache.asMap().keySet().stream().filter(x -> x.path.equals(filePath)).count();
Copy link
Contributor

Choose a reason for hiding this comment

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

Depending on this being on a hot path or not we might contemplate about removing streams in favor of plain for loop.

https://lists.apache.org/thread/65glsjzkmpktzmns6j9wvr4nczvskx36

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is only meant to be used in tests.

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