You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2021/09/20 01:58:01 UTC
[incubator-inlong] branch master updated: [INLONG-1569] The
first_registered is not the same with its naming (#1577)
This is an automated email from the ASF dual-hosted git repository.
dockerzhang 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 feb89a3 [INLONG-1569] The first_registered is not the same with its naming (#1577)
feb89a3 is described below
commit feb89a37f4ffa1c04c4f64a1529ed486a3d332c2
Author: gosonzhang <46...@qq.com>
AuthorDate: Mon Sep 20 09:57:54 2021 +0800
[INLONG-1569] The first_registered is not the same with its naming (#1577)
---
.../tubemq-client-twins/tubemq-client-cpp/src/baseconsumer.cc | 2 +-
.../tubemq-client-twins/tubemq-client-cpp/src/client_subinfo.cc | 6 +++---
.../tubemq-client-twins/tubemq-client-cpp/src/client_subinfo.h | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/baseconsumer.cc b/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/baseconsumer.cc
index 42966e5..3012fe2 100644
--- a/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/baseconsumer.cc
+++ b/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/baseconsumer.cc
@@ -686,7 +686,7 @@ void BaseConsumer::processConnect2Broker(ConsumerEvent& event) {
}
}
}
- sub_info_.BookFstRegistered();
+ sub_info_.BookRegistered();
event.SetEventStatus(2);
LOG_TRACE("[processConnect2Broker] connect event finished, clientid=%s", client_uuid_.c_str());
}
diff --git a/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/client_subinfo.cc b/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/client_subinfo.cc
index 8df82fd..854e640 100644
--- a/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/client_subinfo.cc
+++ b/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/client_subinfo.cc
@@ -34,7 +34,7 @@ ClientSubInfo::ClientSubInfo() {
source_count_ = 0;
session_key_ = "";
not_allocated_.Set(true);
- first_registered_.Set(false);
+ is_registered_.Set(false);
subscribed_time_ = tb_config::kInvalidValue;
bound_partions_ = "";
}
@@ -46,7 +46,7 @@ void ClientSubInfo::SetConsumeTarget(const ConsumerConfig& config) {
// book register time
subscribed_time_ = Utils::GetCurrentTimeMillis();
//
- first_registered_.Set(false);
+ is_registered_.Set(false);
bound_consume_ = config.IsBoundConsume();
topic_and_filter_map_ = config.GetSubTopicAndFilterMap();
// build topic filter info
@@ -114,7 +114,7 @@ bool ClientSubInfo::IsFilterConsume(const string& topic) {
void ClientSubInfo::GetAssignedPartOffset(const string& partition_key, int64_t& offset) {
map<string, int64_t>::iterator it;
offset = tb_config::kInvalidValue;
- if (!first_registered_.Get()
+ if (!is_registered_.Get()
&& bound_consume_
&& not_allocated_.Get()) {
it = assigned_part_map_.find(partition_key);
diff --git a/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/client_subinfo.h b/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/client_subinfo.h
index 1b1e7a1..d391ee9 100644
--- a/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/client_subinfo.h
+++ b/inlong-tubemq/tubemq-client-twins/tubemq-client-cpp/src/client_subinfo.h
@@ -42,7 +42,7 @@ class ClientSubInfo {
ClientSubInfo();
void SetConsumeTarget(const ConsumerConfig& config);
bool CompAndSetNotAllocated(bool expect, bool update);
- void BookFstRegistered() { first_registered_.Set(true); }
+ void BookRegistered() { is_registered_.Set(true); }
bool IsBoundConsume() const { return bound_consume_; }
bool IsNotAllocated() const { return not_allocated_.Get(); }
const int64_t GetSubscribedTime() const { return subscribed_time_; }
@@ -58,7 +58,7 @@ class ClientSubInfo {
private:
bool bound_consume_;
- AtomicBoolean first_registered_;
+ AtomicBoolean is_registered_;
AtomicBoolean not_allocated_;
int64_t subscribed_time_;
map<string, set<string> > topic_and_filter_map_;