-
Notifications
You must be signed in to change notification settings - Fork 19
fix: shutdown order of connected clients #2851
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
base: main
Are you sure you want to change the base?
fix: shutdown order of connected clients #2851
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
feels like a good improvement to more graceful shutdown.
in the flushing kafka w/ a timeout case- if it takes longer than the timeout might we lose data? does it make sense to flush to disk and reload on startup?
In a container env we won't have the disk. But we only ack to the source if the data was written. |
|
||
let producer = if project.features.streaming_engine { | ||
Some(kafka::client::create_producer( | ||
Some(Arc::new(kafka::client::create_producer( |
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.
the kafka producer has an Arc
internally so it's cheaply clone-able, no need for an extra Arc
Note
Overhauls shutdown sequencing: gracefully close HTTP, stop app processes, flush/drop Kafka clients (waiting for librdkafka destroy), and then stop containers; adds cancellable sync processes and minor DX tweaks.
librdkafka
teardown viard_kafka_wait_destroyed
(addsrdkafka-sys
).SyncingProcessesRegistry::stop_all()
; integrates into centralProcessRegistries
and shutdown path.select!
and flush pending work before exit.ProcessRegistries
now ownssyncing
registry;stop()
also halts syncing processes.execute_initial_infra_change
/execute_online_change
APIs updated to remove external syncing param and return/use unified registry.configured_producer
wrapped inArc
; router/ingest signatures updated.kill_child
now SIGTERM then waits with timeout; escalates to SIGKILL if needed;RestartingProcess
updated.workerStop
if startup completed.Written by Cursor Bugbot for commit ab6f948. This will update automatically on new commits. Configure here.