Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: deflake TestPerfLogging #75119

Merged
merged 1 commit into from
Jan 19, 2022

Conversation

rytaft
Copy link
Collaborator

@rytaft rytaft commented Jan 19, 2022

This commit deflakes TestPerfLogging by ensuring that test cases
that should not produce log entries do not match with unrelated log
entries and thus cause the test to fail. This is ensured by making
the regex more precise for the specific test case.

Fixes #74811

Release note: None

@rytaft rytaft requested review from yuzefovich, cucaroach and a team January 19, 2022 02:06
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! :lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @cucaroach and @rytaft)


pkg/sql/event_log_test.go, line 412 at r1 (raw file):

			query:       `INSERT INTO t(i) VALUES (6)`,
			errRe:       ``,
			logRe:       `"EventType":"txn_rows_written_limit"`,

nit: probably could make this regex more specific too


pkg/sql/event_log_test.go, line 486 at r1 (raw file):

			query:       `INSERT INTO t(i) VALUES (15), (16)`,
			errRe:       `pq: txn has written 2 rows, which is above the limit: TxnID .* SessionID .*`,
			logRe:       `"EventType":"txn_rows_written_limit"`,

ditto


pkg/sql/event_log_test.go, line 493 at r1 (raw file):

			query:       `SELECT * FROM t WHERE i = 6`,
			errRe:       ``,
			logRe:       `"EventType":"txn_rows_read_limit"`,

ditto

This commit deflakes TestPerfLogging by ensuring that test cases
that should not produce log entries do not match with unrelated log
entries and thus cause the test to fail. This is ensured by making
the regex more precise for the specific test case.

Fixes cockroachdb#74811

Release note: None
@rytaft rytaft force-pushed the deflake-test-perf-logging branch from a33f059 to 311c2e0 Compare January 19, 2022 15:39
Copy link
Collaborator Author

@rytaft rytaft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTR!

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @cucaroach and @yuzefovich)


pkg/sql/event_log_test.go, line 412 at r1 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

nit: probably could make this regex more specific too

Done.


pkg/sql/event_log_test.go, line 486 at r1 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

ditto

Done.


pkg/sql/event_log_test.go, line 493 at r1 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

ditto

Done.

@craig
Copy link
Contributor

craig bot commented Jan 19, 2022

Build succeeded:

@craig craig bot merged commit 419167d into cockroachdb:master Jan 19, 2022
@blathers-crl
Copy link

blathers-crl bot commented Jan 19, 2022

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 311c2e0 to blathers/backport-release-21.1-75119: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 21.1.x failed. See errors above.


error creating merge commit from 311c2e0 to blathers/backport-release-21.2-75119: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 21.2.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql: TestPerfLogging failed
3 participants