-
Notifications
You must be signed in to change notification settings - Fork 590
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
feat: add trigger_by_flush flag in barrier #15583
Conversation
|
cc @wenym1 PTAL |
(Seems I can't find the After introducing sink commit decouple, I think there are three semantics:
I think we need to have two commands, but I'm concerned whether we should call Flush as Checkpoint. According above definition, we can call them as they are.
From the perspective of implementation, this way may involve less modification because the flush is still a checkpoint. Except for the sink, other parts of the system still treat flush as a checkpoint. Only the sink needs to check whether the checkpoint is triggered by flush. This means that code like For users, they have different semantics. But I'm concerned about whether we need to treat them as two commands in internal implementation. Because flush means checkpoint + commit sink, in this perspective, in most parts of the system except for the sink, we can treat flush as a "checkpoint". |
Yes. This is a command made up by ourselves.
My thoughts is that we will have 2 commands in the future:
I imagined the opposite. 😂 By adding a new variant to the enum, there'll naturally be some compiling errors indicating that which part of code should be updated. Also developers can grep the codebase for However, by introducing a new field alongside the existing |
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.
IIUC, trigger_by_flush
should mean flush all unconsumed messages in log store?
If so, on trigger_by_flush
, I think we should not serialize and write the barrier to log store storage. Instead we should wait for log reader to finish consuming all messages before return.
I think it means a checkpoint barrier before we introduce the sink commit decouple.🤔 What I think is to make flush do it like before. I'm confused about consuming all messages, does it mean all messages before the checkpoint barrier? |
This looks reasonable to me. I think it can be a separate PR. We can:
Cool! Let's make it a BarrierKind::🤣 |
Yes, it means consume all messages before the barrier for sinks with decouple enabled. I think this is the key difference between the flush command and a normal checkpoint command. For implementation, there should not be a new message kind in the log store. On |
After discuss with @wenym1, I find that this is issue already introduce after risingwavelabs/rfcs#55. After enabling a decouple sink, the
So I think it can be a new feature rather than a necessary fix before #13899. May be we can track it together with following refine:
|
Possibly related, adding the ability to flush the logstore may be beneficial to ci, previously clickhouse sink ci failed for a similar reason, which could only be solved by increasing the timeout at that time |
Is there any context to the ci failure? If we manually disable sink decouple by setting |
After reading the comments above, this seems to be the final decision, right?
So shall we close this PR? and create a new issue for this idea? |
Yes, I think so. |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
context:
#13899 will caused sink not necessary flush
This PR involve lots interface change so I'm not sure whether it's good solution.
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.