Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tracing,job: fix NPE in TraceCollector
Previously, TraceCollector.StartIter would return a nil object if we failed to resolve nodeliveness during initialization. This led to a NPE. This change now return a TraceCollector instance with the error field set to the appropriate error, so that the validity check on the iterator can correctly handle this scenario. This change also reworks the dump trace on job cancellation test. Job cancellation semantics under stress are slightly undeterministic in terms of how many times execution of OnFailOrCancel is resumed. This makes it hard to coordinate when to check and how many trace files to expect. Fixes: cockroachdb#68315 Release note: None Release justification: low risk, high benefit changes to existing functionality
- Loading branch information