@@ -152,15 +152,14 @@ void CM2020PSIImpl::asyncRunTask()
152152 {
153153 return ;
154154 }
155-
155+ CM2020_PSI_LOG (INFO) << LOG_DESC ( " noticePeerToFinish " ) << printTaskInfo (task);
156156 psi->noticePeerToFinish (task);
157157 });
158- // check the memory
159- checkHostResource (m_config->minNeededMemoryGB ());
160- addPendingTask (taskState);
161-
162158 try
163159 {
160+ addPendingTask (taskState);
161+ // check the memory
162+ checkHostResource (m_config->minNeededMemoryGB ());
164163 // prepare reader and writer
165164 auto dataResource = task->selfParty ()->dataResource ();
166165 auto reader = loadReader (task->id (), dataResource, DataSchema::Bytes);
@@ -169,7 +168,7 @@ void CM2020PSIImpl::asyncRunTask()
169168 auto role = task->selfParty ()->partyIndex ();
170169 if (role == uint16_t (PartyType::Client) || task->syncResultToPeer ())
171170 {
172- auto writer = loadWriter (task->id (), dataResource, m_enableOutputExists );
171+ auto writer = loadWriter (task->id (), dataResource, task-> enableOutputExists () );
173172 taskState->setWriter (writer);
174173 }
175174
@@ -319,10 +318,11 @@ void CM2020PSIImpl::stop()
319318 CM2020_PSI_LOG (INFO) << LOG_DESC (" CM2020-PSI stopped" );
320319}
321320
322- void CM2020PSIImpl::onReceivedErrorNotification (const std::string& _taskID )
321+ void CM2020PSIImpl::onReceivedErrorNotification (ppc::front::PPCMessageFace::Ptr const & _message )
323322{
323+ CM2020_PSI_LOG (INFO) << LOG_DESC (" onReceivedErrorNotification" ) << printPPCMsg (_message);
324324 // finish the task while the peer is failed
325- auto taskState = findPendingTask (_taskID );
325+ auto taskState = findPendingTask (_message-> taskID () );
326326 if (taskState)
327327 {
328328 taskState->onPeerNotifyFinish ();
@@ -410,7 +410,7 @@ void CM2020PSIImpl::handleReceivedMessage(const ppc::front::PPCMessageFace::Ptr&
410410 {
411411 case int (CommonMessageType::ErrorNotification):
412412 {
413- psi->onReceivedErrorNotification (_message-> taskID () );
413+ psi->onReceivedErrorNotification (_message);
414414 break ;
415415 }
416416 case int (CommonMessageType::PingPeer):
0 commit comments