-
Notifications
You must be signed in to change notification settings - Fork 591
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
Use blocking (foreground) DDL for source and sinks #15587
Comments
Is #14172 a prerequisite for this task? |
will |
Yes eventually. |
I think #13035 is a prerequisite for this. To me this is the main benefit:
I suppose so. I think only sources with backfill will support it. For source created w/o backfill, we can just return immediately. |
+1 that "errors can be explicitly returned to users" is the largest benefit.
Similarly for sources, we also tolerate errors extensively. e.g., risingwave/src/stream/src/executor/source/source_executor.rs Lines 438 to 443 in e3f3fb8
Note that sometimes the errors are tolerated very deep. e.g., I previously tested that when Kafka broker is killed, For sinks I'm not sure, maybe it can raise some errors. |
This reminds me of the consensus we reached earlier: sources should try their best to retry connection failures (even indefinitely) instead of causing the entire streaming graph to enter a recovery loop, at least before risingwavelabs/rfcs#54 or risingwavelabs/rfcs#84 being implemented. So does it mean that we will now introduce a different behavior to let the source error fail the job specifically when it's being created? |
I think if the goal is better UX (know errors earlier, and no need to check logs), maybe yes. Alternatively, maybe we can do more extensive validation when creating source (maybe even attempt to consuming some events?? not always do-able though). But the challenge I mentioned above (error are hidden very deep) still applies. Do you have any better ideas for this goal? |
Ping. Shall we start this? |
Okay I will take a look at it tomorrow. |
Fyi, this task can lead to more complexity in the etcd backend, since we need to support background ddl now as well for source and sinks for users already used to / reliant on the current behaviour (immediate creation, no need wait for backfill). I will start on it tomorrow, but unlikely to finish it that soon. |
Working on blocking Source is not as urgent IMO.
|
For kafka backfill, in 1.9 it won't be the default as mentioned by @xxchan offline. Assigning this issue to @xxchan for the |
Another minor benefit for blocking create-table-with-connector is to cleanup |
Remaining work is low priority. |
This issue has been open for 60 days with no activity. |
remaining tasks tracked in #18338 |
Background
We know that
create mv on table/mv
must wait until the backfilling completed by default, otherwise, the newly created MV cannot be consistent with its upstream, which breaks RisingWave's consistency guarantee as well as PG compatibility.However, regarding of sink and sources, we have to define the behavior. The acceptable options include:
create mv on table/mv
blocks until backfilling completed.create mv on source
andcreate sink
returns immediately.create mv on table/mv/source
blocks until backfilling completed.create sink
returns immediately.create mv on table/mv/source
andcreate sink
all block until backfilling completed. 🥇According to a poll in Slack channel, option 3 wins.
Another advantage of blocking DDL is that the errors can be explicitly returned to users. On the contrary, a failure during background DDL happens after the object becomes available to users, thus, it can only be printed to logs, which is much more difficult for users.
Initial motivation: https://risingwave-labs.slack.com/archives/C06B3SEQQQ1/p1708499966310609?thread_ts=1708489235.143729&cid=C06B3SEQQQ1
Tasks
We have already report the errors during DDL to frontend sessions. #13108
The remaining task is to adjust the default behavior - Use blocking (foreground) DDL for source and sinks for both
create mv on table/mv/source
andcreate sink
by default.Note that this task only changes the default behavior. If users specify
set background_ddl = true
manually, we should follow it as usual.The text was updated successfully, but these errors were encountered: