-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Fixed race condition in cursor.asyncDelete() #287
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
saandrews
approved these changes
Mar 11, 2017
rdhabalia
approved these changes
Mar 11, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
hrsakai
pushed a commit
to hrsakai/pulsar
that referenced
this pull request
Dec 10, 2020
…#287) --- Before BenchmarkCompression/zstd-cgo-level-fastest-16 2272 513861 ns/op 195.78 MB/s BenchmarkCompression/zstd-cgo-level-default-16 1477 772904 ns/op 130.17 MB/s BenchmarkCompression/zstd-cgo-level-best-16 254 4670399 ns/op 21.54 MB/s BenchmarkDecompression/zstd-cgo-level-fastest-16 8382 154040 ns/op 653.11 MB/s BenchmarkDecompression/zstd-cgo-level-default-16 7524 156934 ns/op 641.07 MB/s BenchmarkDecompression/zstd-cgo-level-best-16 7748 162531 ns/op 619.00 MB/s BenchmarkCompressionParallel/zstd-cgo-level-fastest-16 22719 54002 ns/op 1862.99 MB/s BenchmarkCompressionParallel/zstd-cgo-level-default-16 13485 88328 ns/op 1139.01 MB/s BenchmarkCompressionParallel/zstd-cgo-level-best-16 2161 561107 ns/op 179.30 MB/s --- After BenchmarkCompression/zstd-cgo-level-fastest-16 2366 472138 ns/op 213.09 MB/s BenchmarkCompression/zstd-cgo-level-default-16 1576 756111 ns/op 133.06 MB/s BenchmarkCompression/zstd-cgo-level-best-16 271 4452809 ns/op 22.59 MB/s BenchmarkDecompression/zstd-cgo-level-fastest-16 9352 132880 ns/op 757.12 MB/s BenchmarkDecompression/zstd-cgo-level-default-16 8473 142471 ns/op 706.15 MB/s BenchmarkDecompression/zstd-cgo-level-best-16 7413 147722 ns/op 681.05 MB/s BenchmarkCompressionParallel/zstd-cgo-level-fastest-16 23857 50493 ns/op 1992.49 MB/s BenchmarkCompressionParallel/zstd-cgo-level-default-16 13832 87510 ns/op 1149.66 MB/s BenchmarkCompressionParallel/zstd-cgo-level-best-16 2220 526170 ns/op 191.20 MB/s
hangc0276
pushed a commit
to hangc0276/pulsar
that referenced
this pull request
May 26, 2021
Fixes apache#312 These tests were ignored temporarily just because they rely on the outdated methods that convert between MessageId and Kafka offset. So this PR fixes these tests and deletes these outdated methods. The exception is testBrokerRespectsPartitionsOrderAndSizeLimits, it's a broken test that is easily affected by some params. apache#287 and apache#246 are tracking the test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
After recent changes, there is a race condition in
cursor.asyncDelete()
that causes an exception getting triggered when moving mark delete position to an older position.Modifications
The
lock.writeLock()
was being acquired twice and the condition were changing between the two sync blocks.