Skip to content

Commit

Permalink
kvserver: ignore errors encountered while removing live learners
Browse files Browse the repository at this point in the history
This commit fixes a set of failures noticed in #79887 where a bunch of
`EXPERIMENTAL_RELOCATE` calls failed because they tried removing learner
replicas that are in the process of receiving their initial snapshot.

Removing learners in this state is disallowed as of #79379. This commit fixes a
subset of those failures by making the `kv50/rangelookups` roachtest ignore
these errors.

Relates to #79887

Release note: None
  • Loading branch information
aayushshah15 committed May 3, 2022
1 parent dfacec7 commit f69f7fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/kv/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func IsExpectedRelocateError(err error) bool {
"cannot add placeholder",
"removing leaseholder not allowed since it isn't the Raft leader",
"could not find a better lease transfer target for",
// NB: Importing kvserver to use `errCannotRemoveLearnerWhileSnapshotInFlight`
// creates a dependency cycle.
"cannot remove learner while snapshot is in flight", // https://github.com/cockroachdb/cockroach/issues/79887
}
pattern := "(" + strings.Join(allowlist, "|") + ")"
return testutils.IsError(err, pattern)
Expand Down

0 comments on commit f69f7fc

Please sign in to comment.