Skip to content

Commit 8adfc52

Browse files
committed
kvnemesis: treat pg replica unavailable as an unavailable error
This commit expands the condition where we expect a replica unavailable to include pg replica unavailable errors. This will apply to SQL requests that hit things like the leaderless watcher due to a known unavailability Fixes: #158683 Release note: None
1 parent 51d7523 commit 8adfc52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/kv/kvnemesis/applier.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ func exceptConditionFailed(err error) bool {
114114
}
115115

116116
func exceptReplicaUnavailable(err error) bool {
117-
return errors.HasType(err, (*kvpb.ReplicaUnavailableError)(nil))
117+
return errors.HasType(err, (*kvpb.ReplicaUnavailableError)(nil)) ||
118+
strings.Contains(err.Error(), "replica unavailable")
118119
}
119120

120121
func exceptContextCanceled(err error) bool {

0 commit comments

Comments
 (0)