Skip to content

Relax an assertion related to parallel compression#14130

Closed
pdillinger wants to merge 1 commit intofacebook:mainfrom
pdillinger:parallel_compression_assertion_fix
Closed

Relax an assertion related to parallel compression#14130
pdillinger wants to merge 1 commit intofacebook:mainfrom
pdillinger:parallel_compression_assertion_fix

Conversation

@pdillinger
Copy link
Contributor

Summary: Saw a mysterious failure of assertion
assert(rep_->props.num_data_blocks == 0) in
DBCompressionTest/CompressionFailuresTest.CompressionFailures/45. This seems to be caused by a parallel compression failure arriving after the emit thread has started Finish() but before the Flush() at the start of Finish(). We can fix this by relaxing the assertion to allow for the !ok() case. Testing revealed more ok() assertions that needed to be relaxed/moved.

Test Plan: Added a sync point to inject a failure status in the right place and added to unit test to be sure the case is essentially covered. It would arguably be a more realistic test to force a particular thread interleaving but I believe simple is good here.

Summary: Saw a mysterious failure of assertion
`assert(rep_->props.num_data_blocks == 0)` in
DBCompressionTest/CompressionFailuresTest.CompressionFailures/45. This
seems to be caused by a parallel compression failure arriving after the
emit thread has started Finish() but before the Flush() at the start of
Finish(). We can fix this by relaxing the assertion to allow for the
!ok() case. Testing revealed more ok() assertions that needed to be
relaxed/moved.

Test Plan: Added a sync point to inject a failure status in the right
place and added to unit test to be sure the case is essentially covered.
It would arguably be a more realistic test to force a particular thread
interleaving but I believe simple is good here.
@pdillinger pdillinger requested a review from hx235 November 18, 2025 22:29
@meta-cla meta-cla bot added the CLA Signed label Nov 18, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 18, 2025

@pdillinger has imported this pull request. If you are a Meta employee, you can view this in D87377709.

@meta-codesync
Copy link

meta-codesync bot commented Nov 19, 2025

@pdillinger merged this pull request in 0762586.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants