adapter: make statement arrival logging check local#37629
Conversation
Keep the switch synchronized with the system variable through a callback. This avoids an async catalog snapshot for every pgwire message and HTTP request when logging is disabled. Follow-up to MaterializeInc#37567 This seems to have caused a perf. regression, seen in https://buildkite.com/materialize/nightly/builds/17267: QUERY | STAT | THIS | OTHER | CHANGE | THRESHOLD | REGRESSION? ---------------------------------------------------------------------------------------------------------------------- SELECT 1 (standalone) | avg | 13.61 | 11.26 | 20.84% | 20% | !!YES!! SELECT 1 (standalone) | max | 54.85 | 74.97 | -26.84% | | SELECT 1 (standalone) | min | 5.23 | 3.54 | 47.71% | | SELECT 1 (standalone) | p50 | 13.40 | 10.94 | 22.43% | 20% | !!YES!! SELECT 1 (standalone) | p95 | 18.72 | 16.39 | 14.20% | 30% | no SELECT 1 (standalone) | p99 | 22.44 | 19.86 | 12.99% | | SELECT 1 (standalone) | qps | 734.60 | 887.70 | -17.25% | 20% | !!YES!!
|
Looking at this hard now, because if this is true, then we'd have to consider a new RC, since #37567 was just included in an RC yesterday evening. However, my current theory is that only a very small part of the regression was caused by #37567. This is because if #37567 were the cause, then the benchmark runs on this PR should be reversing the effect, i.e., we should be seeing a 15-20% speedup (it's comparing to Discussed also with @def-. Another somewhat plausible candidate is 6c590b0, which is being reverted here #37631. (Note that every connection establishment involves a table write in
Edit: Confirmed in the above before/after runs. |
|
This was not the root cause of the issue, instead #37631 fixes the |
|
(As discussed on slack, an additional problem with the PR is that Claude found multiple pre-existing glitches in the (I'll open issues for the |
Keep the switch synchronized with the system variable through a callback. This avoids an async catalog snapshot for every pgwire message and HTTP request when emergency logging is disabled.
Follow-up to #37567
This seems to have caused a perf. regression, seen in https://buildkite.com/materialize/nightly/builds/17267:
Performance nightly run: https://buildkite.com/materialize/nightly/builds/17310