-
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.
53507: partialidx: reduce remaining filters of semantically equivalent expressions r=rytaft a=mgartner #### partialidx: reduce remaining filters of semantically equivalent expressions This commit reduces the remaining filters returned from the Implicator in cases where expressions in the filter are semantically equivalent to expression in the predicate, but not syntactically equivalent. For example: (a::INT > 17) => (a::INT >= 18) Prior to this commit, `(a > 17)` would remain as a filter to be applied after a partial index scan. However, this filter is unnecessary, because there are no integers between `17` and `18`. With this change, `(a > 17)` is removed from the remaining filters. Release justification: Low risk update to new functionality, partial indexes. Release note (performance improvement): The optimizer reduces filters applied after partial index scans in more cases where the filters are implicitly applied by the partial index predicate. This could lead to more efficient query plans in some cases. #### partialidx: add safer set operations for tracking exact matches This commit adds a typed set for tracking filter expressions that are exact matches of predicate expressions. This will help prevent a common developer mistake of not checking whether or not the set it `nil` before manipulating it, such as the bug fixed by #53222. Benchmarks show performance improvements of the Implicator for some cases as a result of this change. name old time/op new time/op delta Implicator/single-exact-match-16 81.2ns ± 1% 77.8ns ± 1% -4.24% (p=0.008 n=5+5) Implicator/single-inexact-match-16 916ns ± 1% 914ns ± 0% ~ (p=0.254 n=5+5) Implicator/range-inexact-match-16 2.40µs ± 0% 2.46µs ± 1% +2.56% (p=0.008 n=5+5) Implicator/single-exact-match-extra-filters-16 313ns ± 0% 305ns ± 1% -2.74% (p=0.008 n=5+5) Implicator/single-inexact-match-extra-filters-16 3.85µs ± 1% 3.85µs ± 1% ~ (p=0.952 n=5+5) Implicator/multi-column-and-exact-match-16 90.0ns ± 1% 84.3ns ± 1% -6.29% (p=0.008 n=5+5) Implicator/multi-column-and-inexact-match-16 1.99µs ± 0% 2.02µs ± 1% +1.53% (p=0.016 n=4+5) Implicator/multi-column-or-exact-match-16 82.3ns ± 3% 78.1ns ± 1% -5.10% (p=0.008 n=5+5) Implicator/multi-column-or-exact-match-reverse-16 1.72µs ± 1% 1.74µs ± 2% ~ (p=0.397 n=5+5) Implicator/multi-column-or-inexact-match-16 2.23µs ± 2% 2.31µs ± 3% +3.74% (p=0.008 n=5+5) Implicator/and-filters-do-not-imply-pred-16 3.61µs ± 1% 3.63µs ± 4% ~ (p=0.548 n=5+5) Implicator/or-filters-do-not-imply-pred-16 916ns ± 2% 905ns ± 2% ~ (p=0.095 n=5+5) Implicator/many-columns-exact-match10-16 305ns ± 1% 278ns ± 1% -8.97% (p=0.008 n=5+5) Implicator/many-columns-inexact-match10-16 12.9µs ± 1% 12.9µs ± 1% ~ (p=0.841 n=5+5) Implicator/many-columns-exact-match100-16 21.3µs ± 1% 19.2µs ± 2% -9.94% (p=0.008 n=5+5) Implicator/many-columns-inexact-match100-16 502µs ± 1% 503µs ± 1% ~ (p=0.421 n=5+5) Release justification: Low risk update to new functionality, partial indexes. Release note: None 53510: kv: split rate limits and metrics for read and write requests r=nvanbenschoten a=nvanbenschoten Fixes #53483. This commit splits the existing request rate limit into two categories, read requests and write requests. Experimentation has shown that the fixed cost of a request is dramatically different between these two categories, primarily because write requests need to go through Raft while read requests do not. By splitting the limits and metrics along this dimension, we expect to be able to more accurately model the cost of KV traffic and more effectively tune rate limits. In making the split, the commit replaces the existing metric: ``` kv.tenant_rate_limit.requests_admitted ``` with the following two new metrics: ``` kv.tenant_rate_limit.read_requests_admitted kv.tenant_rate_limit.write_requests_admitted ``` The commit also replaced the existing two settings: ``` kv.tenant_rate_limiter.requests.rate_limit kv.tenant_rate_limiter.request.burst_limit ``` with the following four new settings: ``` kv.tenant_rate_limiter.read_requests.rate_limit kv.tenant_rate_limiter.read_requests.burst_limit kv.tenant_rate_limiter.write_requests.rate_limit kv.tenant_rate_limiter.write_requests.burst_limit ``` Release justification: Low-risk, high benefit change. 53517: opt: better error message for multiple arbiters with CONFLICT DO UPDATE r=mgartner a=mgartner This commit improves the error message and adds telemetry for INSERT ON CONFLICT DO UPDATE statements that find multiple matching arbiter indexes. Release justification: This is a low-risk update to new functionality, partial indexes. Release note: None 53544: roachtest: skip and reown tests r=nvanbenschoten,petermattis a=tbg cc @petermattis, let me know if you're opposed to owning the disk-stalled roachtests. I saw while triaging that you and Bilal were discussing fixing the charybdefs setup and I also saw talk about disk stall work in the weekly notes. Release justification: testing only Release note: None Co-authored-by: Marcus Gartner <[email protected]> Co-authored-by: Nathan VanBenschoten <[email protected]> Co-authored-by: Tobias Grieger <[email protected]>
- Loading branch information
Showing
25 changed files
with
323 additions
and
177 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.