-
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.
76279: sql,kvserver: stop gossiping the system config r=ajwerner a=ajwerner The first commit removes the system config gossip trigger and the client code to set it, after a version gate has been passed. The primary major change is that in 22.1 binaries, we no longer rely on the gossip data at any point, instead we adopt the systemconfigwatcher which is backed by a rangefeed. Part of this change is to adopt that separate data source in the `GossipSubscription` implementation of the `Connector` API. Subsequently, a number of tests needed updating. Remove sql.catalog.unsafe_skip_system_config_trigger.enabled This cluster setting is no longer useful. Fixes #54477. Fixes #70560. Release note (sql change): The limitation that schema change statements in a transaction could not follow DML statements has been lifted. 76523: sql: add option to enable/disable txn id cache r=Azhng a=Azhng Reviewer note: only last commit is relevant --- Resolves #76329 Release note (sql change): when `sql.contention.txn_id_cache.max_size` is set to 0, it would effectively turn off transaction ID cache. 76613: ccl/sqlproxyccl: cleanup PG interceptor APIs r=JeffSwenson a=jaylim-crl Informs #76000. #### ccl/sqlproxyccl: update ForwardMsg to take in an io.Writer Previously, interceptors connect a source to a destination. This can be awkward during connection migration because we will now need to update the destination for an existing interceptor. Adding an UpdateWriter (or similar) does not seem right. This PR changes how interceptors work. Instead of connecting one end to another, interceptors are now one sided only. When attempting a write through ForwardMsg, callers will need to pass in a destination of type io.Writer, resulting in a much cleaner API when it comes to connection migration. We will also remove WriteMsg in this commit. This makes interceptors purely readers wrapping net.Conn objects. Since interceptors no longer have destinations, keeping the closed field is not very useful, so this commit removes that as well. A warning has been added to ensure that callers do not reuse interceptors or destinations whenever a ReadMsg or ForwardMsg call returns an error. #### ccl/sqlproxyccl: replace errPanicWriter with a writer that returns an error Previously, we had an errPanicWriter struct that panics whenever a Write call was made. This is used because Receive on the pgproto3 backend and frontend instances must not call Write. However, panics are not ideal, so this commit replaces that with a regular writer that just returns an error when Write is called. #### ccl/sqlproxyccl: use a default buffer size of 8K within the interceptors Previously, we returned an error whenever callers attempt to create interceptors with a small buffer size. This case is very uncommon, and the API can be awkward since we now need to handle the error case. To address that, this commit updates the interceptor's behavior such that we default to an 8K buffer whenever a buffer size smaller than 5 bytes is used. Since sqlproxy is the only user, this seems to be a reasonable tradeoff. At the same time, we also make the specialized interceptors to default to a buffer size of 8K bytes. Release note: None Co-authored-by: Andrew Werner <[email protected]> Co-authored-by: Azhng <[email protected]> Co-authored-by: Jay <[email protected]>
- Loading branch information
Showing
85 changed files
with
940 additions
and
1,178 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.