Skip to content

Commit 1f7b67f

Browse files
committed
Make sure to record the last updates when stop() is called
1 parent e35c4bf commit 1f7b67f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cpp/include/raft/mr/resource_monitor.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ class resource_monitor {
103103
stop_requested_.store(true, std::memory_order_release);
104104
notifier_->notify();
105105
worker_.join();
106+
// Write one more row because we may have missed some updates while spinning down.
107+
// In the worst case, we duplicate one CSV record - not a big deal.
108+
write_row();
106109
}
107110

108111
private:

0 commit comments

Comments
 (0)