Skip to content

dead chanel in UpdateNewAndDoneWatch #61782

@xhebox

Description

@xhebox

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

It started here

err = do.runawayManager.UpdateNewAndDoneWatch()
if err == nil {
logutil.BgLogger().Info("preparations for the runaway manager are finished and start runaway manager loop")
do.wg.Run(do.runawayManager.RunawayRecordFlushLoop, "runawayRecordFlushLoop")
do.wg.Run(do.runawayManager.RunawayWatchSyncLoop, "runawayWatchSyncLoop")
do.runawayManager.MarkSyncerInitialized()

will insert record into channels here

} else if ttl <= 0 {
rm.staleQuarantineRecord <- record
return

The receive loop however is started later than the first call of UpdateNewAndDoneWatch(RunawayRecordFlushLoop)

case r := <-staleQuarantineRecordCh:

If the channel exceeds the maximum(1024), it blocks.

introduced by #52283

2. What did you expect to see? (Required)

non blocking.

3. What did you see instead (Required)

runawayStartLoop blocks forever

4. What is your TiDB version? (Required)

v8.1.0 and later

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions