You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by go...@apache.org on 2021/09/15 10:22:37 UTC
[incubator-inlong] branch master updated: [INLONG-1560] C++ SDK can
not return error code of PartInUse and PartWaiting correctly (#1561)
This is an automated email from the ASF dual-hosted git repository.
gosonzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 51523c7 [INLONG-1560] C++ SDK can not return error code of PartInUse and PartWaiting correctly (#1561)
51523c7 is described below
commit 51523c7d66845fc6c8183cc27cb1ce068bebcdf5
Author: gosonzhang <46...@qq.com>
AuthorDate: Wed Sep 15 18:22:32 2021 +0800
[INLONG-1560] C++ SDK can not return error code of PartInUse and PartWaiting correctly (#1561)
---
.../tubemq-client-cpp/src/rmt_data_cache.cc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/rmt_data_cache.cc b/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/rmt_data_cache.cc
index 86df833..029a736 100644
--- a/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/rmt_data_cache.cc
+++ b/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/rmt_data_cache.cc
@@ -127,9 +127,9 @@ int32_t RmtDataCacheCsm::GetCurConsumeStatus() {
}
if (index_partitions_.empty()) {
if (partition_useds_.empty()) {
- return err_code::kErrAllPartInUse;
- } else {
return err_code::kErrAllPartWaiting;
+ } else {
+ return err_code::kErrAllPartInUse;
}
}
return err_code::kErrSuccess;
@@ -150,11 +150,11 @@ bool RmtDataCacheCsm::SelectPartition(int32_t& error_code, string& err_info,
} else {
if (index_partitions_.empty()) {
if (partition_useds_.empty()) {
- error_code = err_code::kErrAllPartInUse;
- err_info = "No idle partition to consume, please retry later!";
- } else {
error_code = err_code::kErrAllPartWaiting;
err_info = "All partitions reach max position, please retry later!";
+ } else {
+ error_code = err_code::kErrAllPartInUse;
+ err_info = "No idle partition to consume, please retry later!";
}
result = false;
} else {