Unverified Commit f88e7085 authored by Shangming Cai's avatar Shangming Cai Committed by GitHub
Browse files

[Bugfix][PD] Set conclude state before clear when failure happens (#7362)


Signed-off-by: default avatarShangming Cai <caishangming@linux.alibaba.com>
parent 4f838c09
......@@ -742,12 +742,12 @@ class MooncakeKVSender(BaseKVSender):
self.kv_mgr.request_status.pop(self.bootstrap_room)
def failure_exception(self):
self.clear()
# Explicitly set the status to failure since this request has failed in another rank
if self.conclude_state is None:
self.conclude_state = KVPoll.Failed
self.clear()
with self.kv_mgr.failure_lock:
failure_reason = self.kv_mgr.failure_records.pop(
self.bootstrap_room, "Failed due to an unknown reason from another rank"
......@@ -1003,12 +1003,12 @@ class MooncakeKVReceiver(BaseKVReceiver):
self.kv_mgr.request_status.pop(self.bootstrap_room)
def failure_exception(self):
self.clear()
# Explicitly set the status to failure since this request has failed in another rank
if self.conclude_state is None:
self.conclude_state = KVPoll.Failed
self.clear()
with self.kv_mgr.failure_lock:
failure_reason = self.kv_mgr.failure_records.pop(
self.bootstrap_room, "Failed due to an unknown reason from another rank"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment