Skip to content

Commit

Permalink
fix: resolve Shake client hang in HandShaking state due to source Red…
Browse files Browse the repository at this point in the history
…is blocking during AofRewrite
  • Loading branch information
EquentR committed Nov 15, 2024
1 parent ce3c544 commit c506ed0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/reader/sync_standalone_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (r *syncStandaloneReader) checkBgsaveInProgress() {
argv := []interface{}{"INFO", "persistence"}
r.client.Send(argv...)
receiveString := r.client.ReceiveString()
if strings.Contains(receiveString, "rdb_bgsave_in_progress:1") {
if strings.Contains(receiveString, "rdb_bgsave_in_progress:1") || strings.Contains(receiveString, "aof_rewrite_in_progress:1") {
log.Warnf("[%s] source db is doing bgsave, waiting for a while.", r.stat.Name)
} else {
log.Infof("[%s] source db is not doing bgsave! continue.", r.stat.Name)
Expand Down

0 comments on commit c506ed0

Please sign in to comment.