-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](move-memtable) fix DeltaWriterV2 profile use-after-free #26110
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
|
run buildall |
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.
clang-tidy made some suggestions
| } | ||
|
|
||
| Status DeltaWriterV2Map::close() { | ||
| Status DeltaWriterV2Map::close(RuntimeProfile* profile) { |
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.
warning: method 'close' can be made static [readability-convert-member-functions-to-static]
be/src/vec/sink/delta_writer_v2_pool.h:72:
- Status close(RuntimeProfile* profile);
+ static Status close(RuntimeProfile* profile);|
(From new machine)TeamCity pipeline, clickbench performance test result: |
|
run buildall |
|
TeamCity be ut coverage result: |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
yiguolei
left a comment
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
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
wm1581066
left a comment
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
…#26110) The sink who creates the delta writer may be closed while other sinks still using this delta writer. The parent profile is deconstructed and when the last sink trying to update the profile, it will meet use-after-free. To address this issue, we record the profile number in delta writer, and the last sink who close the delta writer will create and update the profile.
…#26110) The sink who creates the delta writer may be closed while other sinks still using this delta writer. The parent profile is deconstructed and when the last sink trying to update the profile, it will meet use-after-free. To address this issue, we record the profile number in delta writer, and the last sink who close the delta writer will create and update the profile.
…#26110) The sink who creates the delta writer may be closed while other sinks still using this delta writer. The parent profile is deconstructed and when the last sink trying to update the profile, it will meet use-after-free. To address this issue, we record the profile number in delta writer, and the last sink who close the delta writer will create and update the profile.
Proposed changes
The sink who creates the delta writer may be closed while other sinks still using this delta writer.
The parent profile is deconstructed and when the last sink trying to update the profile, it will meet use-after-free.
To address this issue, we record the profile number in delta writer,
and the last sink who close the delta writer will create and update the profile.
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...