fix: use remote wal when local wal shutdown (#45753)

issue: #45750

Signed-off-by: chyezh <chyezh@outlook.com>
This commit is contained in:
Zhen Ye 2025-11-22 16:17:05 +08:00 committed by GitHub
parent eea9c8093d
commit 823c7f7e3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -298,7 +298,7 @@ func shouldUseRemoteWAL(err error) bool {
if errors.Is(err, registry.ErrNoStreamingNodeDeployed) {
return true
}
// 2. If the wal is not exist at current streaming node.
// 2. If the wal is not exist at current streaming node or the local wal is shutdown.
streamingServiceErr := status.AsStreamingError(err)
return streamingServiceErr.IsWrongStreamingNode()
return streamingServiceErr.IsWrongStreamingNode() || streamingServiceErr.IsOnShutdown()
}