Skip to content

Conversation

@shanicky
Copy link
Contributor

@shanicky shanicky commented Dec 9, 2025

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

What's changed and what's your intention?

Move the first ticker.tick().await after setting up the notification channel and inserting it into the notification manager. This ensures the notification system is ready before the ticker advances.

  • Prevents missed notifications during initialization
  • Avoids races where channels are not set up in time
  • Improves reliability of async task startup
  • Addresses potential concurrency bug in stream scale manager

Checklist

  • I have written necessary rustdoc comments.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a concurrency bug in the stream scale manager by reordering initialization steps. The notification channel is now fully set up before the first ticker delay, preventing missed notifications during system startup.

  • Moves ticker.tick().await after notification channel setup to prevent race conditions
  • Ensures notifications sent during the initial delay period are properly captured
  • Follows the initialization pattern used in similar components (backup_manager, barrier_worker)

Move the first `ticker.tick().await` after setting up the notification
channel and inserting it into the notification manager. This ensures
the notification system is ready before the ticker advances.

- Prevents missed notifications during initialization
- Avoids races where channels are not set up in time
- Improves reliability of async task startup
- Addresses potential concurrency bug in stream scale manager

Signed-off-by: Shanicky Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants