Skip to content

Commit d8697a4

Browse files
committed
fix cm2020 check hostResource
1 parent 89b8a6b commit d8697a4

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

cpp/wedpr-computing/ppc-psi/src/cm2020-psi/CM2020PSIImpl.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,11 @@ void CM2020PSIImpl::asyncRunTask()
155155

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);

cpp/wedpr-computing/ppc-psi/src/ecdh-multi-psi/EcdhMultiPSIImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ void EcdhMultiPSIImpl::asyncRunTask(
131131
psi->removePartner(taskID);
132132
psi->removePendingTask(taskID);
133133
});
134+
addPendingTask(taskState);
134135
// check the memory
135136
checkHostResource(m_config->minNeededMemoryGB());
136-
addPendingTask(taskState);
137137
// over the peer limit
138138
if (_task->getAllPeerParties().size() > c_max_peer_size)
139139
{

cpp/wedpr-computing/ppc-psi/src/labeled-psi/LabeledPSIImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ void LabeledPSIImpl::asyncRunTask(
115115

116116
psi->noticePeerToFinish(_task);
117117
});
118+
addPendingTask(taskState);
118119
// check the memory
119120
checkHostResource(m_config->minNeededMemoryGB());
120-
addPendingTask(taskState);
121121

122122
auto oprfClient = std::make_shared<EcdhOprfClient>(
123123
sizeof(apsi::Item::value_type) + sizeof(apsi::LabelKey), m_config->hash(),

0 commit comments

Comments
 (0)