-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
88414: util/tracing: trim trace recordings in a smarter way r=andreimatei a=andreimatei Before this patch, when the recording of a child span was being added to the parent, if the number of spans in the child recording + the number of spans in the parent's recording were greater than the span limit (1000), then the child's recording was completely dropped (apart from the structured events, which were still retained). So, for example, if the parent had a recording of 1 span, and the child has a recording of 1000 spans, the whole 1000 spans were dropped. This patch improves things by always combining the parent trace and the child trace, and then trimming the result according to the following arbitrary algorithm: - start at the root of the trace and sort its children by size, desc - drop the fattest children (including their descendents) until the remaining number of spans to drop becomes smaller than the size of the fattest non-dropped child - recurse into that child, with an adjusted number of spans to drop So, the idea is that, recursively, we drop parts of the largest child - including dropping the whole child if needed. Fixes #87536 Release note: None 88707: ui: reduce frequent Metrics page re-rendering r=koorosh a=koorosh Before, many components on Metrics page relied on `nodesSummarySelector` selector that in turn relies on `NodeStatus` that change constantly with every request (and we request it periodically every 10 seconds). `NodeStatus` include lots of unnecessary data for Metrics page (ie. node's and stores last metrics that aren't used on charts) but these changes forces react components to be re-rendered. This patch refactors selectors that are used by metrics page in a way to provide only relevant subset of NodeStatus's info to Graph components and reduce propagation of `props` passing from parent to child components. Instead, use selectors in child components if necessary. Release note: None Resolves #65030 Video that shows how often components were re-rendered **before** this fix - regardless of timewindow, it always updates every 10 seconds: https://user-images.githubusercontent.com/3106437/192295619-9b2da8bd-2fdb-4f5e-96db-688048fc54cf.mov and here's after fix. Components re-render every 10 second for 10 minutes interval and it is not re-rendered for timewindows like 2 weeks or 1 month: https://user-images.githubusercontent.com/3106437/192296089-13103781-6632-46a5-85aa-80ad8b20dd02.mov 88973: sql: pool some of the processor allocations r=yuzefovich a=yuzefovich **sql: clarify closing contract around plan node and row source adapters** This commit cleans up the `rowSourceToPlanNode` adapter (from the DistSQL processor to the planNode object) in the following manner: - it removes the incorrect call to `ConsumerClosed` of the wrapped input. This call was redundant (because the other side of the adapter `planNodeToRowSource` does the closure too) but was also incorrect since it could access the row source that was put back into the sync.Pool (and maybe even picked up by another query). See issue 88964 for more details. - it removes the checks around non-nil "metadata forwarder". These were needed when the local planNode and DistSQL processor engines were merged into one about four years ago, but nowadays the adapter always gets a non-nil forwarder. Fixes: #88964. Release note: None **sql: pool some of the processor allocations** This commit makes it so that we now pool allocations of noop, planNodeToRowSource, and columnarizer processors. Additionally, trailing meta callbacks for these three as well as materializers are changed to not be anonymous functions to further reduce the allocations. Fixes: #88525. Release note: None 89059: cli: fix use of canceled connection in `init` r=erikgrinaker a=tbg The implementation of `./cockroach init` first dials up the node (in a retry loop) and issues a `Health` RPC, to reduce the likelihood of accidental double-init of the cluster in case of network issues. However, this was trying to be too clever: if it managed to dial the node and check its health (using a short-lived context), it would then return that same connection to the caller for use in the Bootstrap RPC. Unfortunately, that connection would sit on top of an `rpc.Context` whose life was tied to a context[^1] that descended from one wrapped by `RunWithTimeout`. In other words, the context would be cancelled by the time the health check method returned. This seems to not cause issues today, since the `rpc.Context` seems to ignore this context cancellation. But in #88625, this suddenly became a problem and now that I've looked at this code, might as wel fix it regardless of whether #88625 is ever going to land. No release note since today's code happens to work. [^1]: https://github.com/cockroachdb/cockroach/blob/aecc58f125ac611f5793101cbd0323df569369db/pkg/cli/rpc_client.go#L46 Release note: None 89064: jobs: make the registry logging less chatty r=dt,stevendanna a=knz The "toggling idleness" log message was the 4th most voluminous log event source in CC, logged 4x more frequently than the first next event source in volume. This commit makes it less verbose. Release note: None Co-authored-by: Andrei Matei <[email protected]> Co-authored-by: Andrii Vorobiov <[email protected]> Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Tobias Grieger <[email protected]> Co-authored-by: Raphael 'kena' Poss <[email protected]>
- Loading branch information
Showing
47 changed files
with
1,277 additions
and
715 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
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
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
Oops, something went wrong.