Skip to content

Commit 65656d4

Browse files
craig[bot]stevendanna
andcommitted
Merge #152930
152930: kvtestutils: fix SysBytes regex r=miraradeva a=stevendanna The | operators precedence meant that the previous regex could match string such as OtherBytes:22. Epic: none Release note: None Co-authored-by: Steven Danna <[email protected]>
2 parents eb8c0d9 + bb0ac9b commit 65656d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/kv/kvtestutils/consistency.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func CheckConsistency(ctx context.Context, db querier, span roachpb.Span) []erro
6464
delta = regexp.MustCompile(`LastUpdateNanos:\d+`).ReplaceAllString(delta, "")
6565
delta = regexp.MustCompile(`\S+:0\b`).ReplaceAllString(delta, "")
6666
// The two cases below correspond to the two linked issues above.
67-
if regexp.MustCompile(`^\s*SysBytes:-?10|12|20|22|24\s*$`).MatchString(delta) {
67+
if regexp.MustCompile(`^\s*SysBytes:-?(10|12|20|22|24)\s*$`).MatchString(delta) {
6868
continue
6969
}
7070
// The SysCount and SysBytes should be either both positive or negative.

0 commit comments

Comments
 (0)