-
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.
135228: sql: fix edge case causing suboptimal generic query plans r=mgartner a=mgartner This commit fixes a bug that caused suboptimal generic query plans to be planned under all of the following conditions: 1. `plan_cache_mode` was set to `force_custom_plan` (the default). 2. A query was prepared and an ideal generic query plan was selected (i.e., it used the placeholder fast path). 3. New stats were collected, making the original plan stale and increasing the estimated row count of the root expression beyond `maxRowCountForPlaceholderFastPath` (10). 4. The prepared query was re-executed. Fixes #135151 There is no release note because this bug does not exist in any releases. Release note: None 135237: rac2,tracker: use CircularBuffer for tracker.Inflights r=kvoli,pav-kv a=sumeerbhola The custom circular/ring buffer implementation in Raft's tracker.Inflights does not shrink and unnecessarily grows to the maximum configured size (unless the buffer becomes empty). With RAC2, the maximum size is no longer a maximum, in lazy replication mode. There was a bug in incorrectly trying to impose this maximum, which motivated this slightly bigger cleanup. In general, it is beneficial for the inflight buffer to also shrink, and by using the existing CircularBuffer, we can simplify the code in tracker.Inflights. As part of this change rac2.CircularBuffer is moved to util/container/ring and becomes ring.Buffer. There is another ring.Buffer in util/ring, which doesn't shrink and is not optimized to use bit arithmetic -- there is a todo added there to replace it with the implementation in util/container/ring. Fixes #135223 Epic: none Release note: None Co-authored-by: Marcus Gartner <[email protected]> Co-authored-by: sumeerbhola <[email protected]>
- Loading branch information
Showing
15 changed files
with
239 additions
and
171 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
Oops, something went wrong.