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

Revert "Revert "util/log: more misc cleanups"" #57222

Merged
merged 2 commits into from
Nov 30, 2020

Conversation

knz
Copy link
Contributor

@knz knz commented Nov 30, 2020

Reverts #57178.

This re-instates #57000, as it did not "introduce a race in crdb"
The description in #57178 was incorrect - instead #57161 / #57162 merely outlined a bug in some tests, which remains to be fixed.

This PR also includes a temporary workaround for said test bug.

Fixes #57162.
Fixes #57161 (presumably - although the symptoms there don't align).

knz added 2 commits November 30, 2020 13:19
This re-instates cockroachdb#57000, as it did not "introduce a race in crdb"

(Instead it merely outlined a bug in a test, which is to be fixed in a
subsequent commit.)

Release note: None
The pgwire code uses goroutines whose execution extends past the
server's stopper's `Stop()` call. This is arguably a mis-design which
needs to be fixed -- but in the meantime the logging package needs to
tolerate it. This patch ensures that asynchronous `log` calls can be
performed concurrently with a `TestLogScope`'s `Close()` call.

Release note: None
@knz knz requested review from itsbilal, irfansharif and a team November 30, 2020 12:57
@knz knz requested a review from a team as a code owner November 30, 2020 12:57
@knz knz requested review from dt and removed request for a team November 30, 2020 12:57
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 59 of 59 files at r1, 1 of 1 files at r2.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @dt and @irfansharif)

Copy link
Contributor

@irfansharif irfansharif left a comment

Choose a reason for hiding this comment

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

Woops, sorry about the misattribution, just friday evening laziness. LGTM (though I think we want to re-order these commits for git bisectability).

@knz
Copy link
Contributor Author

knz commented Nov 30, 2020

The two commits cannot be inverted - the 2nd commit works around the bug in the test within the context set up by the 1st commit.

@knz
Copy link
Contributor Author

knz commented Nov 30, 2020

TFYR

bors r=irfansharif

@craig
Copy link
Contributor

craig bot commented Nov 30, 2020

Build succeeded:

@craig craig bot merged commit 13ce0e8 into cockroachdb:master Nov 30, 2020
knz added a commit to knz/cockroach that referenced this pull request Dec 3, 2020
As discussed previously in cockroachdb#57222 - the SQL servers do not obey the
server stop logic well and leak goroutines that continue to log while
the TestLogScope gets closed.

This commit continues to tolerate this misdesign by ensuring that
some more stderr-related flags are accessed atomically.

Release note: None
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/pgwire: TestConnResultsBufferSize failed cli: TestZipSpecialNames failed
4 participants