-
Notifications
You must be signed in to change notification settings - Fork 169
[#2711] fix(spark): Race condition on deferred compressed block initialization #2712
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
Conversation
| private final Function<DeferredCompressedBlock, DeferredCompressedBlock> rebuildFunction; | ||
| private int estimatedCompressedSize; | ||
| private boolean isInitialized = false; | ||
| private AtomicBoolean isInitialized = new AtomicBoolean(false); |
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.
Is this change still needed after using synchronized?
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.
I use the double-lock to ensure the rebuilding happen only once, maybe this is not necessary to make this var sync.
|
Could you explain the reason for this issue? @zuston |
This bug only happens when the overlapping compression is enabled, this will be modified by the multi threads at the same time |
What I don't understand is why |
Got your thought, I haven't found the root cause. |
|
thanks. @xianjingfeng @jerqi let me merge this |
What changes were proposed in this pull request?
Fix race condition on deferred compressed block initialization
Why are the changes needed?
fix #2711
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing unit tests