Skip to content

Commit 6b0d541

Browse files
authored
CBG-4674 mark DropIndex error as retryable (#7603)
1 parent 7593dfe commit 6b0d541

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

base/collection_n1ql_common.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,16 @@ func IsIndexerRetryIndexError(err error) bool {
419419
if err == nil {
420420
return false
421421
}
422-
if strings.Contains(err.Error(), "will retry") || strings.Contains(err.Error(), "will be retried") {
423-
return true
422+
retryableStrings := []string{
423+
"will retry",
424+
"will be retried",
425+
// [{\"code\":5000,\"message\":\"GSI Drop() - cause: Fail to Drop Index due to internal errors. Cleanup may happen in the background. Error=DeleteScheduleCreateToken:*:Rev mismatch.\"}]
426+
"Drop Index due to internal errors. Cleanup may happen in the background",
427+
}
428+
for _, s := range retryableStrings {
429+
if strings.Contains(err.Error(), s) {
430+
return true
431+
}
424432
}
425433
return false
426434
}

0 commit comments

Comments
 (0)