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

release-20.1: pgwire: trim statements past the conn executor's rewind pos eagerly #52402

Merged
merged 1 commit into from
Aug 10, 2020

Conversation

asubiotto
Copy link
Contributor

Backport 1/1 commits from #48859.

/cc @cockroachdb/release


Previously, the conn executor held on to all executed statements in case they
needed to be retried. These would only be discarded once the transaction
committed. This could lead to a memory blowup in some cases.

With the knowledge that statements whose results have been returned cannot be
retried, this commit eagerly discards those statements every time a command is
executed rather than waiting for the transaction to commit.

Release note (bug fix): executing a large number of statements in a transaction
without committing could previously crash a cockroach server, this is now
fixed.

Addresses #47969

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@andreimatei
Copy link
Contributor

andreimatei commented Aug 5, 2020 via email

@asubiotto
Copy link
Contributor Author

Initial failure was a weird execution timeout that seems to have been making the rounds. Reran TC manually and got a green CI but doesn't look like the dependency got updated. Triggering a new run with the same commit but new sha.

@asubiotto asubiotto force-pushed the backport20.1-48859 branch 2 times, most recently from f2ce054 to b8a995d Compare August 7, 2020 12:15
Previously, the conn executor held on to all executed statements in case they
needed to be retried. These would only be discarded once the transaction
committed. This could lead to a memory blowup in some cases.

With the knowledge that statements whose results have been returned cannot be
retried, this commit eagerly discards those statements every time a command is
executed rather than waiting for the transaction to commit.

Release note (bug fix): executing a large number of statements in a transaction
without committing could previously crash a cockroach server, this is now
fixed.
@asubiotto asubiotto merged commit aef5a20 into cockroachdb:release-20.1 Aug 10, 2020
@asubiotto asubiotto deleted the backport20.1-48859 branch August 10, 2020 13:41
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.

None yet

3 participants