replay: emit segmentsMerged before updateEvent (#28849)

old-commit-hash: 3ad434c5ca
This commit is contained in:
Dean Lee 2023-07-09 08:09:54 +08:00 committed by GitHub
parent 483dcfbec4
commit 2d88501e21
1 changed files with 3 additions and 3 deletions

View File

@ -301,14 +301,14 @@ void Replay::mergeSegments(const SegmentMap::iterator &begin, const SegmentMap::
}
}
if (stream_thread_) {
emit segmentsMerged();
}
updateEvents([&]() {
events_.swap(new_events_);
segments_merged_ = segments_need_merge;
return true;
});
if (stream_thread_) {
emit segmentsMerged();
}
}
}