mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
chore: stop periodic task earlier during the shutdown process (#4187)
Fixes #4151 Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
e7b49fa1c4
commit
1709061ae6
2 changed files with 3 additions and 3 deletions
|
@ -403,11 +403,10 @@ void EngineShard::Shutdown() {
|
||||||
queue2_.Shutdown();
|
queue2_.Shutdown();
|
||||||
DCHECK(!fiber_heartbeat_periodic_.IsJoinable());
|
DCHECK(!fiber_heartbeat_periodic_.IsJoinable());
|
||||||
DCHECK(!fiber_shard_handler_periodic_.IsJoinable());
|
DCHECK(!fiber_shard_handler_periodic_.IsJoinable());
|
||||||
|
|
||||||
ProactorBase::me()->RemoveOnIdleTask(defrag_task_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EngineShard::StopPeriodicFiber() {
|
void EngineShard::StopPeriodicFiber() {
|
||||||
|
ProactorBase::me()->RemoveOnIdleTask(defrag_task_);
|
||||||
fiber_heartbeat_periodic_done_.Notify();
|
fiber_heartbeat_periodic_done_.Notify();
|
||||||
if (fiber_heartbeat_periodic_.IsJoinable()) {
|
if (fiber_heartbeat_periodic_.IsJoinable()) {
|
||||||
fiber_heartbeat_periodic_.Join();
|
fiber_heartbeat_periodic_.Join();
|
||||||
|
|
|
@ -969,7 +969,8 @@ void SerializerBase::DumpObject(const CompactObj& obj, io::StringSink* out) {
|
||||||
// 1. Save the value itself - without the key
|
// 1. Save the value itself - without the key
|
||||||
// 2. Save footer: this include the RDB version and the CRC value for the message
|
// 2. Save footer: this include the RDB version and the CRC value for the message
|
||||||
auto type = RdbObjectType(obj);
|
auto type = RdbObjectType(obj);
|
||||||
DVLOG(1) << "We are going to dump object type: " << int(type);
|
DVLOG(2) << "We are going to dump object type: " << int(type);
|
||||||
|
|
||||||
std::error_code ec = serializer.WriteOpcode(type);
|
std::error_code ec = serializer.WriteOpcode(type);
|
||||||
CHECK(!ec);
|
CHECK(!ec);
|
||||||
ec = serializer.SaveValue(obj);
|
ec = serializer.SaveValue(obj);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue