Skip to content

Fix bad assert hit on CC cluster #491

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 2 commits into from
Jul 11, 2025
Merged

Fix bad assert hit on CC cluster #491

merged 2 commits into from
Jul 11, 2025

Conversation

tjake
Copy link
Member

@tjake tjake commented Jul 2, 2025

The assert in this PR was hit on a test Cassandra cluster. Looking at it it doesn't make sense to me as the size of the layer will not correspond to the max nodeId in the layer.

@marianotepper
Copy link
Collaborator

Thanks for catching the bug.

However, I believe that the right assertion should be:
assert nodeId >= 0 && nodeId < idUpperBound
This way, we check both ends of the range.

@marianotepper
Copy link
Collaborator

I have added a new commit with the change I proposed above

@marianotepper marianotepper removed their request for review July 8, 2025 23:40
@tlwillke
Copy link
Collaborator

tlwillke commented Jul 8, 2025

@tjake can you please try this fix with your test case? Thanks!

Copy link
Member Author

@tjake tjake left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Collaborator

@tlwillke tlwillke left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for the quick fix.

@tlwillke tlwillke merged commit 22a3a2f into main Jul 11, 2025
8 checks passed
@tlwillke tlwillke deleted the bad-assert branch July 11, 2025 18:35
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