-
Notifications
You must be signed in to change notification settings - Fork 141
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
[Bug] NullPointerException of WriterBuffer.getData due to race condition #808
Comments
I want to use the thread safe list to solve this problem. WDYT? @jerqi |
Ok for me. |
…getData due to race condition
Oh. This bug may cause data lost. |
I would like to revert #706 . I take a look at the pr that you fix. It seems that the mind is not clear for me. |
Why do this issue cause data lost? We have checked the block infos in the reader. |
#848) ### What changes were proposed in this pull request? 1. Guarantees thread safe by only allowing spills to be triggered by the current thread 2. Using the same logic of processing blocks in the `RssShuffleWriter` and `WriteBufferManager` to ensure the data consistency ### Why are the changes needed? Fix: #808 In this PR, we use the two ways to solve the concurrent problem for `addRecord` and `spill` function 1. For the same thread, the spill will be invoked when adding records and unsuffcient memory. This case could ensure thread safe. So it will do the spill sync. 2. When spill is invoked by other consumers, it will do nothing in this thread and just set a signal to let owner to release when adding record. After this, we could avoid lock(may cause performance regression, like #811 did) to keep thread safe ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? 1. UTs
…en records to enhance data accuracy
…sure data correctness (#1558) ### What changes were proposed in this pull request? Verify the number of written records to enhance data accuracy. Make sure all data records are sent by clients. Make sure bugs like #714 will never be introduced into the code. ### Why are the changes needed? A follow-up PR for #848. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing UTs.
Code of Conduct
Search before asking
Describe the bug
This bug is caused by #706 . After this, the
buffers
inWriterBuffer
will be visited by multi threads.Stacktrace:
Affects Version(s)
master
Uniffle Server Log Output
No response
Uniffle Engine Log Output
No response
Uniffle Server Configurations
No response
Uniffle Engine Configurations
No response
Additional context
No response
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: