Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
92087: jobs: add pause-point to pause on any error r=dt a=dt Release note (sql change): the new 'error' pause-point can be enabled via the jobs.debug.pausepoints setting to pause, rather than fail, when a job execution returns an error to the job execution system. Epic: none. 98609: tsearch: speed up TSVector.String r=yuzefovich a=yuzefovich Fixes: #98595. **tsearch: speed up TSVector.String** This commit speeds up `TSVector.String` by reusing exactly the same `strings.Builder` object for all parts of the TSVector. This commit also introduces a simple benchmark for this method. `benchstat` seems to be busted a bit, but the impact of this commit is: ``` │ /tmp/tmp.Unz2XLUFdB/bench.HEAD^^ │ /tmp/tmp.Unz2XLUFdB/bench.HEAD^ │ │ sec/op │ sec/op vs base │ TSVector/String-24 14.590m ± 0% 8.272m ± 0% -43.31% (p=0.000 n=10) TSVector/StringSize-24 14.654m ± 0% 8.269m ± 0% -43.57% (p=0.000 n=10) geomean 14.62m 8.270m -43.44% │ /tmp/tmp.Unz2XLUFdB/bench.HEAD^^ │ /tmp/tmp.Unz2XLUFdB/bench.HEAD^ │ │ B/op │ B/op vs base │ TSVector/String-24 4.516Mi ± 0% 2.319Mi ± 0% -48.65% (p=0.000 n=10) TSVector/StringSize-24 4.516Mi ± 0% 2.319Mi ± 0% -48.65% (p=0.000 n=10) geomean 4.516Mi 2.319Mi -48.65% │ /tmp/tmp.Unz2XLUFdB/bench.HEAD^^ │ /tmp/tmp.Unz2XLUFdB/bench.HEAD^ │ │ allocs/op │ allocs/op vs base │ TSVector/String-24 273.6k ± 0% 105.6k ± 0% -61.41% (p=0.000 n=10) TSVector/StringSize-24 273.6k ± 0% 105.6k ± 0% -61.41% (p=0.000 n=10) geomean 273.6k 105.6k -61.41% ``` Release note: None **tsearch: add optimize StringSize method** This commit introduces `TSVector.StringSize` method which is optimized equivalent of `len(TSVector.String())` which avoids the construction of the string. This method is now utilized by `DTSVector.Size`. This results in some code duplication but it seems worth it: ``` │ /tmp/tmp.zD8FYqMrdo/bench.HEAD^ │ /tmp/tmp.zD8FYqMrdo/bench.HEAD │ │ sec/op │ sec/op vs base │ TSVector/String-24 8.404m ± 0% 8.135m ± 0% -3.20% (p=0.000 n=10) TSVector/StringSize-24 8.381m ± 0% 3.547m ± 0% -57.67% (p=0.000 n=10) geomean 8.393m 5.372m -35.99% │ /tmp/tmp.zD8FYqMrdo/bench.HEAD^ │ /tmp/tmp.zD8FYqMrdo/bench.HEAD │ │ B/op │ B/op vs base │ TSVector/String-24 2.349Mi ± 0% 2.323Mi ± 0% -1.12% (p=0.000 n=10) TSVector/StringSize-24 2405.6Ki ± 0% 192.1Ki ± 0% -92.02% (p=0.000 n=10) geomean 2.349Mi 675.9Ki -71.90% │ /tmp/tmp.zD8FYqMrdo/bench.HEAD^ │ /tmp/tmp.zD8FYqMrdo/bench.HEAD │ │ allocs/op │ allocs/op vs base │ TSVector/String-24 106.7k ± 0% 105.8k ± 0% -0.88% (p=0.000 n=10) TSVector/StringSize-24 106.72k ± 0% 61.46k ± 0% -42.41% (p=0.000 n=10) geomean 106.7k 80.63k -24.44% ``` Release note: None Co-authored-by: David Taylor <[email protected]> Co-authored-by: Yahor Yuzefovich <[email protected]>
- Loading branch information