Skip to content

roachtest: avoid releasing alloc multiple times#68203

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
tbg:roachtest-fix-sema
Jul 29, 2021
Merged

roachtest: avoid releasing alloc multiple times#68203
craig[bot] merged 1 commit intocockroachdb:masterfrom
tbg:roachtest-fix-sema

Conversation

@tbg
Copy link
Copy Markdown
Member

@tbg tbg commented Jul 28, 2021

As of #68103, existing problems in the cluster creation retry logic
are tickled reliably: on retry we are releasing an alloc twice,
resulting in a panic. Unfortunately, the alloc is acquired several
layers above the retry, so for now the best I can do is to avoid
releasing the alloc if we are bound for a retry.

The reason the above PR tickles it more reliably is because it
accidentally removed a sensible failfast: when the cluster already
exists, we shouldn't destroy & try to recreate it again (which
would then explode on the double-release anyway).

Release note: None

@tbg tbg requested a review from a team as a code owner July 28, 2021 20:31
@tbg tbg requested review from a team and otan and removed request for a team July 28, 2021 20:31
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

As of cockroachdb#68103, existing problems in the cluster creation retry logic
are tickled reliably: on retry we are releasing an alloc twice,
resulting in a panic. Unfortunately, the alloc is acquired several
layers above the retry, so for now the best I can do is to avoid
releasing the alloc if we are bound for a retry.

The reason the above PR tickles it more reliably is because it
accidentally removed a sensible failfast: when the cluster already
exists, we shouldn't destroy & try to recreate it again (which
would then explode on the double-release anyway).

Release note: None
@tbg tbg force-pushed the roachtest-fix-sema branch from 7b0f42a to 013ad19 Compare July 28, 2021 20:41
@tbg
Copy link
Copy Markdown
Member Author

tbg commented Jul 28, 2021

I "tested" this by adding a if i == 0 { err = errors.New("boom") } and running a roachtest. It worked.

@tbg tbg requested a review from erikgrinaker July 28, 2021 20:41
Copy link
Copy Markdown
Contributor

@erikgrinaker erikgrinaker left a comment

Choose a reason for hiding this comment

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

I share your reluctance about this approach, but I guess it gets the job done for now.

@tbg
Copy link
Copy Markdown
Member Author

tbg commented Jul 29, 2021

bors r=erikgrinaker

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 29, 2021

Build succeeded:

@craig craig bot merged commit f7507c2 into cockroachdb:master Jul 29, 2021
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