Skip to content
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

rac2: fix incorrect assertion when send-queue becomes empty #135500

Merged
merged 1 commit into from
Nov 16, 2024

Conversation

sumeerbhola
Copy link
Collaborator

The indexToSend in this case was being updated before the loop, but the preciseSizeSum was incrementally deducted inside the loop. This meant that if more than one item was being popped and the queue was becoming empty, the code would incorrectly assert that preciseSizeSum should be 0 after subtracting the tokens for the first entry.

Fixes #135289, #135344

Epic: none

Release note: None

The indexToSend in this case was being updated before the loop, but
the preciseSizeSum was incrementally deducted inside the loop. This
meant that if more than one item was being popped and the queue was
becoming empty, the code would incorrectly assert that preciseSizeSum
should be 0 after subtracting the tokens for the first entry.

Fixes cockroachdb#135289, cockroachdb#135344

Epic: none

Release note: None
@sumeerbhola sumeerbhola requested a review from a team as a code owner November 16, 2024 17:18
Copy link

blathers-crl bot commented Nov 16, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@sumeerbhola
Copy link
Collaborator Author

TFTR!

@sumeerbhola
Copy link
Collaborator Author

bors r=kvoli

@craig craig bot merged commit a5ab060 into cockroachdb:master Nov 16, 2024
23 checks passed
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.

sql/importer: [empty send-queue with non-zero precise size] TestImportIntoCSV failed
3 participants