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

Fixed race condition in cursor.asyncDelete() #287

Merged
merged 1 commit into from
Mar 11, 2017

Conversation

merlimat
Copy link
Contributor

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.

@merlimat merlimat added the type/bug The PR fixed a bug or issue reported a bug label Mar 10, 2017
@merlimat merlimat added this to the 1.17 milestone Mar 10, 2017
@merlimat merlimat self-assigned this Mar 10, 2017
@merlimat merlimat requested review from rdhabalia and saandrews March 10, 2017 23:00
Copy link
Contributor

@rdhabalia rdhabalia left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@merlimat merlimat merged commit d1cb591 into apache:master Mar 11, 2017
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
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants