diff --git a/core/general-client/src/general_model.cpp b/core/general-client/src/general_model.cpp index 5d4f732fc19b605cb2e130c61a2e3cc0b2edc13a..86f75bc1c1b401cd14f2c6651ea52ef08fdb8c40 100644 --- a/core/general-client/src/general_model.cpp +++ b/core/general-client/src/general_model.cpp @@ -244,6 +244,7 @@ int PredictorClient::batch_predict( res.Clear(); if (_predictor->inference(&req, &res) != 0) { LOG(ERROR) << "failed call predictor with req: " << req.ShortDebugString(); + _api.thrd_clear(); return -1; } else { client_infer_end = timeline.TimeStampUS(); diff --git a/core/sdk-cpp/include/stub_impl.hpp b/core/sdk-cpp/include/stub_impl.hpp index 756c12893393f10a1c2ebfa83bf3a94adac7a4bc..5f19c0cad739ef33428bccbb48009ad648691b99 100644 --- a/core/sdk-cpp/include/stub_impl.hpp +++ b/core/sdk-cpp/include/stub_impl.hpp @@ -133,7 +133,10 @@ int StubImpl::initialize(const VariantInfo& var, template int StubImpl::thrd_initialize() { if (THREAD_GETSPECIFIC(_bthread_key) != NULL) { - LOG(WARNING) << "Already thread initialized for stub"; + // Because gPRC is uesd, this function may be called + // multiple times, so the warning will be commented out + // temporarily. See PR:#483 and PR:#500 for details. + // LOG(WARNING) << "Already thread initialized for stub"; return 0; }