-
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
76172: server: enhance comments surrounding draining r=knz a=cameronnunez This patch improves the comments related to the draining process, fixing incorrect statements and providing more details to make the process more easily understood. Release note: None 76409: sql: block FKs to/from TTL tables r=otan a=otan This table blocks FKs to and from TTL tables. Note the RFC previously only said to, but I actually thought of a new case and decided that is was probably prudent to block this both ways. RFC is reflected accordingly. Release note: None 76417: ccl/sqlproxyccl: add connector component and support for session revival token r=JeffSwenson a=jaylim-crl Informs #76000. Previously, all the connection establishment logic is coupled with the handler function within proxy_handler.go. This makes connecting to a new SQL pod during connection migration difficult. This commit refactors all of those connection logic out of the proxy handler into a connector component, as described in the connection migration RFC. At the same time, we also add support for the session revival token within this connector component. Note that the overall behavior of the SQL proxy should be unchanged with this commit. Release note: None 76534: storageccl,cloud: plumb ctx to external file Readers r=andreimatei a=andreimatei This patch changes the interface implemented by all the cloud-specific file readers to take a ctx for their Read() and Close() methods. Before, some implementations were capturing a ctx at construction time, which is generally a bad thing to do - operations should generally run in the caller's ctx, rather than in some ctx captured in the past. Besides being generally bad, it's also dangeroursd: in two instances, cloud.ResumingReader was capturing a ctx that was immediately becoming invalid because the tracing span in it was being closed[1] (so when the ResumingReader was trying to use the captured ctx, that was a use-after-finish of the respective tracing span). A stack trace show such a use-after-Finish is captured in [2]. This patch improves the situation by plumbing ctxs to the Read()s. Now, ResumingReader no longer captures a ctx. The plumbing has not spread anywhere because of practical reasons. Unfortunately, I had to make storageccl.sstReader capture a ctx (the sstReader wraps file readers such as cloud.ResumingReader). If contexts are to be used at all, someone needs to capture one since the sstReader is used through the pebble.sstable.Reader interface which does not plumb contexts. This lifting up of the context capture from ResumingReader to sstReader is a good thing since sstReader is not a broadly used type and the capturing of the context is now more visible; it's no longer hidden many layers down. Also, the use-after-Finish in the ResumingReader is fixed because the higher-level ctx captured by the sstReader (a DistSQL processor ctx) lives long enough. [1] https://github.com/cockroachdb/cockroach/blob/3be8121ad9e96416c49c27947facfa18831794b9/pkg/cloud/gcp/gcs_storage.go#L186 and also https://github.com/cockroachdb/cockroach/blob/0a6b7427603c268b41e39d7acba917c1227859ca/pkg/cloud/amazon/s3_storage.go#L497 [2] https://gist.github.com/andreimatei/7b86d414a93c81cf93ffe68fe2788ec6 Release note: None 76545: cmd/reduce: add -tlp option r=yuzefovich a=yuzefovich **cmd/reduce: remove stdin option and require -file argument** We tend to not use the option of passing input SQL via stdin, so this commit removes it. An additional argument in favor of doing that is that the follow-up commit will introduce another mode of behavior that requires `-file` argument to be specified, so it's just cleaner to always require it now. Release note: None **cmd/reduce: add -tlp option** This commit adds `-tlp` boolean flag that changes the behavior of `reduce`. It is required that `-file` is specified whenever the `-tlp` flag is used. The behavior is such that the last two queries (delimited by empty lines) in the file contain unpartitioned and partitioned queries that return different results although they are equivalent. If TLP check is requested, then we remove the last two queries from the input which we use then to construct a special TLP check query that results in an error if two removed queries return different results. We do not just include the TLP check query into the input string because the reducer would then reduce the check query itself, making the reduction meaningless. Release note: None 76598: server: use channel for DisableAutomaticVersionUpgrade r=RaduBerinde a=RaduBerinde DisableAutomaticVersionUpgrade is an atomic integer which is rechecked in a retry loop. This is not a very clean mechanism, and can lead to issues where you're unknowingly dealing with a copy of the knobs and setting the wrong atomic. The retry loop can also add unnecessary delays in tests. This commit changes DisableAutomaticVersionUpgrade from an atomic integer to a channel. If the channel is set, auto-upgrade waits until the channel is closed. Release note: None Co-authored-by: Cameron Nunez <[email protected]> Co-authored-by: Oliver Tan <[email protected]> Co-authored-by: Jay <[email protected]> Co-authored-by: Andrei Matei <[email protected]> Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Radu Berinde <[email protected]>
- Loading branch information
Showing
103 changed files
with
1,748 additions
and
479 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
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.