Skip to content

Commit 5745078

Browse files
committed
work
1 parent ccba17a commit 5745078

12 files changed

+2430
-2249
lines changed

ydb/core/kafka_proxy/actors/kafka_balance_actor_sql.cpp

+8-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const TString INSERT_NEW_GROUP = R"sql(
1010
DECLARE $Database AS Utf8;
1111
DECLARE $Master AS Utf8;
1212
DECLARE $LastHeartbeat AS Datetime;
13+
DECLARE $ProtocolType AS Utf8;
1314
1415
INSERT INTO `%s`
1516
(
@@ -18,7 +19,8 @@ const TString INSERT_NEW_GROUP = R"sql(
1819
state,
1920
database,
2021
last_heartbeat_time,
21-
master
22+
master,
23+
protocol_type
2224
)
2325
VALUES
2426
(
@@ -27,7 +29,8 @@ const TString INSERT_NEW_GROUP = R"sql(
2729
$State,
2830
$Database,
2931
$LastHeartbeat,
30-
$Master
32+
$Master,
33+
$ProtocolType
3134
);
3235
)sql";
3336

@@ -148,7 +151,7 @@ const TString CHECK_GROUP_STATE = R"sql(
148151
DECLARE $ConsumerGroup AS Utf8;
149152
DECLARE $Database AS Utf8;
150153
151-
SELECT state, generation, master, last_heartbeat_time, consumer_group, database
154+
SELECT state, generation, master, last_heartbeat_time, consumer_group, database, protocol
152155
FROM `%s`
153156
WHERE consumer_group = $ConsumerGroup
154157
AND database = $Database;
@@ -184,7 +187,7 @@ const TString CHECK_DEAD_MEMBERS = R"sql(
184187
AND last_heartbeat_time < $Deadline;
185188
)sql";
186189

187-
const TString UPDATE_TTLS = R"sql(
190+
const TString UPDATE_LASTHEARTBEATS = R"sql(
188191
--!syntax_v1
189192
DECLARE $ConsumerGroup AS Utf8;
190193
DECLARE $Generation AS Uint64;
@@ -208,7 +211,7 @@ const TString UPDATE_TTLS = R"sql(
208211
)sql";
209212

210213

211-
const TString UPDATE_TTL_LEAVE_GROUP = R"sql(
214+
const TString UPDATE_LASTHEARTBEAT_TO_LEAVE_GROUP = R"sql(
212215
--!syntax_v1
213216
DECLARE $ConsumerGroup AS Utf8;
214217
DECLARE $MemberId AS Utf8;

0 commit comments

Comments
 (0)