-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scheme shard support for cdc stream per index #4650
Scheme shard support for cdc stream per index #4650
Conversation
⚪
|
⚪
|
⚪
|
⚪
|
ydb/core/protos/flat_scheme_op.proto
Outdated
@@ -827,6 +827,10 @@ message TCreateCdcStream { | |||
optional TCdcStreamDescription StreamDescription = 2; | |||
optional uint64 RetentionPeriodSeconds = 3 [default = 86400]; // 1d by default | |||
optional uint32 TopicPartitions = 4; | |||
oneof IndexMode { | |||
bool AllIndexes = 5; // Create topic per each index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Есть смысл передавать AllIndexes = false
? Чем это отличается от IndexMode == NOT_SET
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ничем, но просто поле enum нельзя положить в oneof, или как ты предлагаешь?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Предлагаю google.protobuf.empty AllIndexes
, если достаточно (и всегда будет) самого факта. Или хотя бы TAllIndexes AllIndexes
, где TAllIndexes
— это пустое сообщение (если его предполагается когда-нибудь расширять).
@@ -827,6 +827,10 @@ message TCreateCdcStream { | |||
optional TCdcStreamDescription StreamDescription = 2; | |||
optional uint64 RetentionPeriodSeconds = 3 [default = 86400]; // 1d by default | |||
optional uint32 TopicPartitions = 4; | |||
oneof IndexMode { | |||
bool AllIndexes = 5; // Create topic per each index | |||
string IndexName = 6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не очень понял, для чего нужен этот режим?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ну мы можем или создать стримы для всех индексов, или только для определенных. Кроме того нам надо передать TCreateCdcStream в сабоперацию и удобно иметь тут же информацию об индексе для которой создана сабоперация. Есть идеи как это выразить лучше?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Какой сценарий создания стрима только для определенного (даже не списка) индекса?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ну к примеру у тебя часть индексов используется для местной аналитики и не нужна на реплике, а часть для OLTP запросов. Или же наоборот. Список наверно лучше тут.
ydb/core/tx/schemeshard/schemeshard__operation_create_cdc_stream.cpp
Outdated
Show resolved
Hide resolved
7e6b712
to
924a023
Compare
924a023
to
4af1121
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Обновил pr и оставил комментарии.
⚪
|
⚪
|
⚪
|
⚪
|
Changelog category
Additional information
...