Skip to content

Bind DB queue names and job payloads as text - #33

Merged
elpete merged 3 commits into
nextfrom
perf/db-job-bindings
Sep 9, 2026
Merged

elpete merged 3 commits into
nextfrom
perf/db-job-bindings

Conversation

@elpete

@elpete elpete commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

DBProvider.push currently asks qb to infer SQL types for every queue name and serialized job payload, even though both fields are text. Bind these two values explicitly as VARCHAR to avoid repeated numeric/date/type inference during native dispatch. Epoch timestamps, delays, attempt bindings, per-call query construction and provider lifecycle hooks retain their existing behavior.

Regression coverage exercises actual native inserts with long Unicode JSON, nested values, literal quote/backslash/newline characters, leading-zero queue names, delayed availability and bigint attempts. This PR is stacked on #32 (fix/db-execution-counter-capacity).

Validation at this candidate:

  • A disposable PostgreSQL/BoxLang application passes 39 integration checks covering text persistence, publication, recipient scope and native processing. A separate committed-state probe proves complete rollback on notification conflict, a late deadline and failure of the second native job insertion, followed by successful same-key retry and permanent replay.
  • Six alternating pairs of 500 real native pushes, after 100 warmup jobs per provider, give original/candidate medians of 1,704/1,418.5 ms (16.75% lower). The candidate is faster in four of six pairs; the last two are slower. Every sample is rolled back and the committed queue snapshot is unchanged. This measures push cost, not publication p95 or queue throughput.
  • The application's installed dependencies are unchanged: only the uniquely owned verifier copy receives this candidate. Candidate runtime hashes and original-provider benchmark source are retained with the results. All disposable resources are independently verified removed.
  • At ecec9cf3e36bf01e6e621323f4815789d0d441e8, Lucee 5/6, Adobe 2021/2023/2025, formatting and security checks all pass. The final test uses literal text comparison for queue names.
  • The exact narrowed runtime completes all functional checks in a disposable 1,000-offer publication measurement: 2,037 Send statements, 4.864 seconds to the final transaction update and 5.420 seconds through account visibility (including a counter snapshot request). The account gate fails; this single sample is not p95 acceptance. All owned resources are independently verified removed.
  • Local CFFormat and git diff --check pass. The application subsequently adopts the exact Git package with all 32 runtime files matched against upstream and root qb unchanged; native installed-package verification remains application-specific follow-up.

@elpete
elpete marked this pull request as ready for review September 8, 2026 12:47
@elpete
elpete added this pull request to stack #31 September 9, 2026 01:17
@elpete
elpete removed this pull request from stack #31 September 9, 2026 01:28
@elpete
elpete added this pull request to stack #36 September 9, 2026 01:29
@elpete
elpete force-pushed the perf/db-job-bindings branch from ecec9cf to 5ed1cd5 Compare September 9, 2026 01:39
@elpete
elpete force-pushed the perf/db-job-bindings branch from 5ed1cd5 to 2a432d5 Compare September 9, 2026 01:44
Base automatically changed from fix/db-execution-counter-capacity to next September 9, 2026 02:00
@elpete
elpete force-pushed the perf/db-job-bindings branch from 2a432d5 to a645322 Compare September 9, 2026 02:00
@elpete
elpete merged commit 628a6e3 into next Sep 9, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant