-
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.
71037: opt: rename ScalarID to ScalarRank r=mgartner a=mgartner Previously, every scalar expression (except lists and list items) had an ID that was said to be unique within the context of a memo. These IDs were originally added as a way to canonically order filters. Being named "IDs", their use later expanded to check for equality of two scalar expressions. Maintaining this uniqueness invariant is difficult in practice and has dangerous implications when it is violated, as seen in #71002. While two different scalar expressions with the same ID could certainly cause problems for sorting filters, using these IDs to check for scalar expression equality can be catastrophic. For example, a filter expression that shares an ID with another expression could be completely removed from the filter. Unfortunately, there's no obvious way to add test build assertions that scalar IDs are in fact unique, as explained in #71035. In order to lessen the blast radius of breaking this invariant, this commit renames "scalar ID" to "scalar rank". The comment for this attribute does not explicitly guarantee its uniqueness. This renaming should urge contributors to only use this value for ordering scalar expressions canonically, not for scalar expression equality. Instead, pointer equality should be used to check if two scalar expressions are the same. Release note: None 71056: util/tracing: make some span options in singletons r=andreimatei a=andreimatei A couple of span creation options are empty structs implementing the SpanOption interface. Being an empty struct, putting it in an interface doesn't allocate as the compiler optimizes small types in interfaces. Still, the output of `gcflags=-m` lists the value as escaping to the heap, very confusingly. This patch introduces singletons for the structs to make it clear that there's no allocation. Release note: None 71108: server,*: untangle the Tracer from the Settings r=andreimatei a=andreimatei See individual commits. Co-authored-by: Marcus Gartner <[email protected]> Co-authored-by: Andrei Matei <[email protected]>
- Loading branch information
Showing
62 changed files
with
322 additions
and
180 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
Oops, something went wrong.