Skip to content

roachtest: limit FingerprintValidator's memory usage internally#89782

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
renatolabs:cdc-mixed-versions-workload-timeout
Oct 13, 2022
Merged

roachtest: limit FingerprintValidator's memory usage internally#89782
craig[bot] merged 1 commit intocockroachdb:masterfrom
renatolabs:cdc-mixed-versions-workload-timeout

Conversation

@renatolabs
Copy link
Copy Markdown

@renatolabs renatolabs commented Oct 11, 2022

In #89332, we started optionally validating changefeed semantics in the FingerprintValidator by making sure that unseen updates are never observed if a resolved message is received. In order to keep bounds on the validator's memory usage, the cdc/mixed-versions test was setting a maximum number of operations at the workload level. However, a consequence of that change is that it creates the possibility for the workload to finish before the roachtest has received all the resolved events it expects (for instance, if draining takes longer than usual for some reason; a variety of other non-determinism is also at play).

To deal with this possibility, we instead enforce a maximum number of previously seen events at the validator's level. For the cdc/mixed-versions test, we set a maximum of 100,000 previously seen events being stored (20MB memory footprint). This should be equivalent to roughly 50,000 bank transfers, and give enough time for the test to finish successfully.

Release note: None

Epic: None.

@renatolabs renatolabs requested review from a team and removed request for a team October 11, 2022 21:28
@renatolabs renatolabs requested a review from a team as a code owner October 11, 2022 21:28
@renatolabs renatolabs requested a review from smg260 October 11, 2022 21:28
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@renatolabs
Copy link
Copy Markdown
Author

A potential way to deal with flakes like #87574 (comment).

In cockroachdb#89332, we started optionally validating changefeed semantics in
the `FingerprintValidator` by making sure that unseen updates are never
observed if a `resolved` message is received. In order to keep bounds on
the validator's memory usage, the `cdc/mixed-versions` test was
setting a maximum number of operations at the workload level. However,
a consequence of that change is that it creates the possibility for the
workload to finish before the roachtest has received all the
`resolved` events it expects (for instance, if draining takes longer
than usual for some reason; a variety of other non-determinism is also
at play).

To deal with this possibility, we instead enforce a maximum number of
previously seen events at the validator's level. For the
`cdc/mixed-versions` test, we set a maximum of 100,000 previously seen
events being stored (20MB memory footprint). This should be equivalent
to roughly 50,000 bank transfers, and give enough time for the test to
finish successfully.

Epic: None.

Release note: None.
@renatolabs renatolabs force-pushed the cdc-mixed-versions-workload-timeout branch from d2d8edc to ac7758d Compare October 12, 2022 21:07
Copy link
Copy Markdown
Member

@srosenberg srosenberg left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @smg260)

@renatolabs
Copy link
Copy Markdown
Author

bors r=miretskiy,srosenberg

TFTRs!

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 13, 2022

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 13, 2022

Build succeeded:

@craig craig bot merged commit 3bdca7d into cockroachdb:master Oct 13, 2022
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.

4 participants