Skip to content

changefeedccl: skip testing queries that are too slow as regular SQL#96967

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
HonoreDB:timeout_fix
Mar 9, 2023
Merged

changefeedccl: skip testing queries that are too slow as regular SQL#96967
craig[bot] merged 1 commit intocockroachdb:masterfrom
HonoreDB:timeout_fix

Conversation

@HonoreDB
Copy link
Copy Markdown
Contributor

TestChangefeedRandomExpressions was occasionally timing out when doing the regular SELECT query--it's tricky to get sqlsmith not to generate complex expressions that are likely to not be valid for changefeeds anyway, so this PR just skips predicates that take more than a second to process.

Informs #96532.

Release note: None

@HonoreDB HonoreDB requested a review from a team as a code owner February 10, 2023 18:01
@HonoreDB HonoreDB requested review from samiskin and removed request for a team February 10, 2023 18:01
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

query = "SELECT array_to_string(IFNULL(array_agg(distinct rowid),'{}'),'|') FROM seed WHERE " + where
t.Log(query)
rows := s.DB.QueryRow(query)
timeoutCtx, cancel := context.WithTimeout(context.Background(), time.Second*2)
Copy link
Copy Markdown
Contributor

@samiskin samiskin Mar 9, 2023

Choose a reason for hiding this comment

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

Nit that doesn't really matter: This has a timeout of 2 seconds but the commit message says 1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks!

TestChangefeedRandomExpressions was occasionally timing out when doing
the regular SELECT query--it's tricky to get sqlsmith not to generate
complex expressions that are likely to not be valid for changefeeds
anyway, so this PR just skips predicates that take more than 2 seconds
to process.

Informs cockroachdb#96532.

Release note: None
@HonoreDB
Copy link
Copy Markdown
Contributor Author

HonoreDB commented Mar 9, 2023

bors r=[samiskin]

@craig craig bot merged commit 6f444d4 into cockroachdb:master Mar 9, 2023
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 9, 2023

Build succeeded:

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.

3 participants