Repository navigation
Description
Feature or gap
Direct five-run Python comparisons intermittently exceed the 10% latency criterion for a one-MiB SQL PUT/GET/REMOVE lifecycle. At kernel 7a93810, lifecycle medians were 1.636800 → 2.557788 s (+56.27%) and PUT was 0.783334 → 1.710980 s (+118.42%). An earlier c3e7cf1 cohort was +3.34% total; the conflicting results remain separate.
A preserved cohort at kernel e78a4b1 and Python 04a52c5e showed another gap: lifecycle 1.647034 → 2.030147 s (+23.26%), PUT 0.816392 → 1.188155 s (+45.54%). GET is -4.67% and REMOVE +1.34%. Functional results passed, but that cohort failed performance acceptance. Later results do not explain or erase it.
Proposed fix or next investigation
Add URL-free timing for SQL submission/completion, local-file readiness, request upload, attempt count, connection setup/reuse and storage response wait in the shared native path. Correlate matched direct runs privately with server timings, then fix the measured owning layer. Expected benefit is unquantified; a speculative pooling, timeout or retry change is not justified.
The controlling native path is src/statement/volume.rs::{transfer,send_transfer}, reached from Python statement execution. The Python change in that cohort balances nested leading comments. Unprefixed acceptance SQL never enters that changed branch; an isolated five-block, 100,000-call scanner diagnostic measured 146.57 → 147.29 ns/call. That cost cannot explain the observed hundreds of milliseconds. A pooled native HTTP client already exists. These observations exclude those proposed explanations but do not establish the direct slowdown's cause.
Exact retrospective attribution is blocked: the direct cohorts have no per-request timeline and the validation identity cannot access server query history. Preserve both failed cohorts and require a five-run direct comparison against the unchanged 10% criterion after a measured fix.
Dependencies
None for the timing investigation. Server-history access is needed for complete server attribution. Go timing investigation #442 shares the proposed native instrumentation and is an independent follow-up.
Tests and validation
Each direct comparison uses equal warmups, five alternating measured runs per side, equivalent one-MiB bytes, full consumption, byte equality, unique filenames and verified loaded native artifacts. Connections/authentication are excluded.
A separate proxy diagnostic at 7a93810 did not reproduce the old gap: +4.50% total and +3.71% PUT. Each call made one successful one-MiB storage PUT; native SQL submission wait was 330.4 ms.
A separate five-run proxy diagnostic at e78a4b1/Python 04a52c5e also did not reproduce that gap: 1.659470 → 1.706566 s (+2.84%) total and 0.850814 → 0.844581 s (-0.73%) PUT. Each side made one observed one-MiB storage PUT per call, all HTTP 200. Median storage response waits were 518.81 ms and 524.10 ms; native SQL HTTP duration was 315.22 ms and time outside observed requests was 2.91 ms. Thrift SQL requests bypass this observation proxy, so baseline SQL duration is unavailable. Phase medians are non-additive, and proxy connection behavior differs from direct connections. Neither diagnostic supplies an acceptance verdict or explains the direct gap.
Current final-artifact direct comparison at kernel 37c7a3e / Python d119a79: lifecycle 1.700986 → 1.723573 s (+1.33%); PUT 0.850881 → 0.837102 s (-1.62%). All comparable Python medians meet the 10% criterion. The updated filename fallback passes 434 focused tests and fresh live/error/stream probes with unchanged verified native bytes. This result does not establish a fix for earlier direct latency gaps; keep the attribution follow-up open.
Activity