[fix](move-memtable) ensure segment is flushed before add segment#26522
[fix](move-memtable) ensure segment is flushed before add segment#26522dataroaring merged 3 commits intoapache:masterfrom
Conversation
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
run buildall |
| } | ||
|
|
||
| Status LoadStreamWriter::add_segment(uint32_t segid, SegmentStatistics& stat) { | ||
| Status LoadStreamWriter::add_segment(uint32_t segid, const SegmentStatistics& stat) { |
There was a problem hiding this comment.
warning: method 'add_segment' can be made static [readability-convert-member-functions-to-static]
be/src/runtime/load_stream_writer.h:73:
- Status add_segment(uint32_t segid, const SegmentStatistics& stat);
+ static Status add_segment(uint32_t segid, const SegmentStatistics& stat);|
PR approved by at least one committer and no changes requested. |
|
run buildall |
|
TeamCity be ut coverage result: |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
|
PR approved by at least one committer and no changes requested. |
Proposed changes
Currently segment flush is async, and ADD_SEGMENT is handled immediately.
When ADD_SEGMENT arrives, segment flush may not been finished, causing corruption.
Fix this issue by execute ADD_SEGMENT asyncly in the same FIFO threadpool of segment flush.
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...