risingwavelabs / risingwave

Best-in-class stream processing, analytics, and management. Perform continuous analytics, or build event-driven applications, real-time ETL pipelines, and feature stores in minutes. Unified streaming and batch. PostgreSQL compatible.
https://go.risingwave.com/slack
Apache License 2.0
7.06k stars 581 forks source link

fix(compactor): Fix an unexpected termination of shared compactor #19505

Closed Li0k closed 22 hours ago

Li0k commented 1 day ago

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

If the shutdown_tx returned by the function is not retained, then shutdown_rx will receive an exit message and the shared compactor loop will be terminated.

This pr maintains the lifetime of the start_shared_compactor return value to avoid this problem.

This PR is just a hot fix, and does not prevent serverless compactor v2.0.x from being tested. If necessary, a separate PR will be launched to address the compactor graceful shutdown and cancel task issues.

Checklist

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.