-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
util/log: more misc cleanups #57000
util/log: more misc cleanups #57000
Conversation
8d70e75
to
74864da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 10 of 10 files at r1, 13 of 13 files at r2, 43 of 43 files at r3.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @knz, @miretskiy, and @tbg)
pkg/util/log/flags.go, line 92 at r2 (raw file):
// for folk to close the terminal where they launched 'cockroach // start --background'. // We keep this true for now for backward-compatibility.
Probably worth turning this into a TODO(knz): Disable this when called with --background
. Or like elsewhere, you could just have it be TODO(knz): Make this configurable
.
Prior to this patch, whether to number log entries (a feature used for audit log) was defined per channel. Foreseeing a future where the same sink (e.g. a single file) is used by multiple channels, we want to make sure that the same counter value is not reused for multiple entries written to the same sink. So the numbering is really a property of the sink, not the channel. This patch effects the change. Release note: None
The parameters "threshold" and "formatter" are actually defined for all sinks. So they do not need to live "inside" the `logSink`. This patch extracts them to the `sinkInfo` which further simplifies the code. Release note: None
Previously, all the crash reporting code was inside the 'log' package directly. This forced 'log' to import the cluster setting machinery, and the test files to import the entire code base to instantiate test servers. As a result, re-building running unit tests was fairly long. This patch alleviates the situation by moving the crash reporting machinery into its own sub-package 'logcrash'. Release note: None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @itsbilal, @miretskiy, and @tbg)
pkg/util/log/flags.go, line 92 at r2 (raw file):
Previously, itsbilal (Bilal Akhtar) wrote…
Probably worth turning this into a
TODO(knz): Disable this when called with --background
. Or like elsewhere, you could just have it beTODO(knz): Make this configurable
.
Good idea. Done.
74864da
to
2c66148
Compare
TFYR! bors r=itsbilal |
Build failed (retrying...): |
Build succeeded: |
This reverts cockroachdb#57000, which introduced a race to crdb. Was able to reproduce it using make stressrace PKG=./pkg/sql/pgwire TESTS=TestConnResultsBufferSize The buggy commit in question appears to be ffd7f68. Release note: None
57178: Revert "util/log: more misc cleanups" r=irfansharif a=irfansharif This reverts #57000, which introduced a race to crdb. Was able to reproduce it using make stressrace PKG=./pkg/sql/pgwire TESTS=TestConnResultsBufferSize The buggy commit in question appears to be ffd7f68. Touches #57162 and #57161. Release note: None Co-authored-by: irfan sharif <[email protected]>
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
56395: sqlsmith: add schema-related operations r=jordanlewis a=jordanlewis User-defined schemas are now supported in sqlsmith. UDSs will be randomly generated, and new tables will be randomly included in the available UDSs. Queries will select from any table, including those inside of UDSs as well. Closes #54961. Release note: None 57222: Revert "Revert "util/log: more misc cleanups"" r=irfansharif a=knz 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). Co-authored-by: Jordan Lewis <[email protected]> Co-authored-by: Raphael 'kena' Poss <[email protected]>
Helps towards #51987
See individual commits for details.