Skip to content

Commit bb0ac9b

Browse files
committed
kvtestutils: fix SysBytes regex
The | operators precedence meant that the previous regex could match string such as OtherBytes:22. Epic: none Release note: None
1 parent 9e0ba6b commit bb0ac9b

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)