-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
52201: util/log: prevent ReportPanic() from swallowing panics in some cases r=andreimatei a=knz Accompanies #52200 (but is an independent change) Prior to this patch, if `ReportPanic()` was called and the panic object ultimately discarded (ie. caught) during tests that were not otherwise using `TestLogScope`, the panic object would be lost. I believe this was directly noticed by @andreimatei prior. I also believe this was causing panic objects to disappear quite a lot in fact, because the test runner *also* catches panics and fails to report them adequately in some cases (e.g. when the panic occurs during a `stress` run). To alleviate the situation, this patch removes some logic previously present in the code that was attempting (and failing) to remove duplicate panic prints. That logic was misdesigned to start with anyway (by me), because it was working under the assumption that `ReportPanic()` was *only* called for uncaught panics, and another function `RecoverAndReportNonfatalPanic()` just before that was blatantly violating that assumption. Removing the logic causes reportable panics to always be reported in logs and on stderr, regardless of whether it's caught or not. This provides more guarantees that the panic object will be seen, at the expense of having a duplicate print in some edge cases. Release note: None 52250: sql: use a string builder in decodeCopy r=mjibson a=mjibson For returning strings, a string builder is better than a bytes buffer. ``` name old time/op new time/op delta DecodeCopySimple-12 10.8ns ± 1% 10.6ns ± 1% -2.03% (p=0.024 n=5+5) DecodeCopyEscaped-12 249ns ± 1% 178ns ± 2% -28.71% (p=0.008 n=5+5) name old alloc/op new alloc/op delta DecodeCopySimple-12 0.00B 0.00B ~ (all equal) DecodeCopyEscaped-12 96.0B ± 0% 40.0B ± 0% -58.33% (p=0.008 n=5+5) name old allocs/op new allocs/op delta DecodeCopySimple-12 0.00 0.00 ~ (all equal) DecodeCopyEscaped-12 2.00 ± 0% 2.00 ± 0% ~ (all equal) ``` Release note: None 52254: roachtest: bump PredecessorVersion(20.2) to 20.1.4 r=RaduBerinde a=RaduBerinde Release note: None Co-authored-by: Raphael 'kena' Poss <[email protected]> Co-authored-by: Matt Jibson <[email protected]> Co-authored-by: Radu Berinde <[email protected]>
- Loading branch information
Showing
5 changed files
with
33 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters