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
Flaky python unit test test_publish_compact_and_consume #2321
Comments
Still happening in https://builds.apache.org/job/pulsar_precommit_cpp/5783/console |
Tried to run 100s of times in a loop within a Docker container on mac laptop and was not able to reproduce so far.. |
After compaction completes the compacted ledger is recorded as a property of a cursor. As persisting the cursor is async and we don't wait for the acknowledgement of the acknowledgement, there may be a race if we try to read the compacted ledger immediately. To avoid this race, I've added a 1 second sleep to allow the compacted ledger to be updated on the broker.
For the record I only managed one natural repro of this (with stress-ng --aggressive --class scheduler --all 5). It appears to be a very narrow race. It can be widened by changing the thenAccept to thenAcceptAsync at Line 99 in 13ea25a
|
After compaction completes the compacted ledger is recorded as a property of a cursor. As persisting the cursor is async and we don't wait for the acknowledgement of the acknowledgement, there may be a race if we try to read the compacted ledger immediately. To avoid this race, I've added a 1 second sleep to allow the compacted ledger to be updated on the broker.
Expected behavior
Seen failure at : https://builds.apache.org/job/pulsar_precommit_cpp/2951/console
The text was updated successfully, but these errors were encountered: