diff --git a/oneflow/core/actor/actor.cpp b/oneflow/core/actor/actor.cpp index 8df2ea5ac734c4a40bd87e3b36adefd4d2ba41a1..aba59cce515d751117b21952f6866f1cca07e214 100644 --- a/oneflow/core/actor/actor.cpp +++ b/oneflow/core/actor/actor.cpp @@ -431,7 +431,12 @@ int Actor::ProcessWriteableCtrlRegstMsg(const ActorMsg& msg) { } int Actor::ProcessReadableCtrlRegstMsg(const ActorMsg& msg) { - return consumed_ctrl_rs_.TryPushBackRegst(msg.regst()); + if (consumed_ctrl_rs_.HasRegstDescId(msg.regst_desc_id())) { + CHECK_EQ(0, consumed_ctrl_rs_.TryPushBackRegst(msg.regst())); + return 0; + } else { + return -1; + } } void Actor::AsyncSendCtrlRegstMsg() {