Skip to content

Commit c1a98c4

Browse files
Add log when BlockingCancel timeouts
Introduce log in PendingRequests' CancelPendingRequests on timeout from BlockingCancel Relates-To: OLPEDGE-909 Signed-off-by: Diachenko Mykahilo <[email protected]>
1 parent 925a4ff commit c1a98c4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

olp-cpp-sdk-dataservice-read/src/PendingRequests.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@
1818
*/
1919

2020
#include "PendingRequests.h"
21+
22+
#include <olp/core/logging/Log.h>
2123
#include "TaskContext.h"
2224

2325
namespace olp {
2426
namespace dataservice {
2527
namespace read {
2628

29+
namespace {
30+
constexpr auto kLogTag = "PendingRequests";
31+
}
32+
2733
PendingRequests::PendingRequests(){};
2834

2935
PendingRequests::~PendingRequests(){};
@@ -40,7 +46,9 @@ bool PendingRequests::CancelPendingRequests() {
4046
}
4147

4248
for (auto context : contexts) {
43-
context.BlockingCancel();
49+
if (!context.BlockingCancel()) {
50+
OLP_SDK_LOG_WARNING(kLogTag, "Timeout, when waiting on BlockingCancel");
51+
}
4452
}
4553

4654
return true;

0 commit comments

Comments
 (0)