This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new 7b35b1d4e [rpc] fix typo in branch prediction
7b35b1d4e is described below
commit 7b35b1d4e6743743f1497d08880ab246db5c5f58
Author: Alexey Serbin <[email protected]>
AuthorDate: Tue Feb 20 21:22:46 2024 -0800
[rpc] fix typo in branch prediction
This is a follow-up to 3f0c434143ad6daa8ed4f39d8ceacbe58604dd29
Change-Id: I5af612277dc5b03bdee597212885d47c823a6025
Reviewed-on: http://gerrit.cloudera.org:8080/21044
Reviewed-by: Abhishek Chennaka <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
---
src/kudu/rpc/service_pool.cc | 2 +-
src/kudu/rpc/service_queue-test.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kudu/rpc/service_pool.cc b/src/kudu/rpc/service_pool.cc
index f6e1f6b99..00d420c99 100644
--- a/src/kudu/rpc/service_pool.cc
+++ b/src/kudu/rpc/service_pool.cc
@@ -176,7 +176,7 @@ Status
ServicePool::QueueInboundCall(unique_ptr<InboundCall> call) {
return Status::OK();
}
- if (PREDICT_TRUE(evicted)) {
+ if (PREDICT_FALSE(evicted.has_value())) {
RejectTooBusy(*evicted);
}
diff --git a/src/kudu/rpc/service_queue-test.cc
b/src/kudu/rpc/service_queue-test.cc
index 6a2eb4b62..a970c3474 100644
--- a/src/kudu/rpc/service_queue-test.cc
+++ b/src/kudu/rpc/service_queue-test.cc
@@ -74,7 +74,7 @@ void ProducerThread(Queue* queue) {
break;
}
- if (PREDICT_TRUE(evicted)) {
+ if (PREDICT_FALSE(evicted.has_value())) {
LOG(INFO) << "call evicted: producer exiting";
delete *evicted;
break;