Skip to content

feat(rfc): one tuning vocabulary — threads and fetch_size - #129

Merged
jrosskopf merged 1 commit into
masterfrom
claude/unified-tuning-api
Aug 31, 2026
Merged

feat(rfc): one tuning vocabulary — threads and fetch_size#129
jrosskopf merged 1 commit into
masterfrom
claude/unified-tuning-api

Conversation

@jrosskopf

@jrosskopf jrosskopf commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Step 1 of the next plan block. Taken first because it constrains every later item — retrofitting consistency after three extensions have shipped divergent names is how the current divergence arose.

The problem

Paging and parallelism were spelled differently in each extension:

today
RFC THREADS + erpl_rfc_read_table_batch_budget
ODP threads, and zero settings registered
BICS neither

Learning one taught you nothing about the others.

The vocabulary

Concept Named parameter Session setting
Parallelism threads erpl_<ext>_max_threads
Fetch granule fetch_size erpl_<ext>_fetch_size

fetch_size keeps each protocol's natural unit — for sap_read_table that is concurrent result rows, which is what bounds the SAP SDK's own buffer on wide tables. It was previously reachable only as a session setting, so it could not be tuned per query.

This PR applies it to sap_read_table. ODP follows in its own PR (it also gains I_MAXPACKAGESIZE, currently hard-coded at 2 MiB and unreachable); BICS gains threads when chunking lands.

No breaking renames

erpl_rfc_read_table_batch_budget keeps working and writes the same value. They are two spellings of one knob, not two knobs — documented as such.

Testing

Both are transport settings, and the test asserts exactly that: DD02L (~165k rows) read at the default, at a fetch_size small enough to force many extra round-trips, and with threads = 2 — compared by symmetric EXCEPT ALL. If a batch boundary could drop or duplicate a row, that is where it would show.

C++ suite green (39 cases, 2825 assertions).

Note on documentation

The threads description deliberately does not quote a recommended value. How much parallelism helps depends on the SAP system's capacity — work processes, application servers, database sessions — not on erpl, and a figure measured on a single-container trial would understate a real system. The docs say to raise it while watching throughput, and to check with Basis before a large parallel extract against production.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Paging and parallelism were spelled differently in every extension: RFC had THREADS
plus erpl_rfc_read_table_batch_budget, ODP had threads and no settings at all, BICS
had neither. Learning one taught you nothing about the others.

Settles the shared names and applies them to sap_read_table first:

  threads     / erpl_rfc_max_threads   -- how many SAP calls run at once
  fetch_size  / erpl_rfc_fetch_size    -- how much is asked for per round-trip

fetch_size keeps each protocol's natural unit; here that is concurrent result rows,
which is what bounds the SAP SDK's buffer on wide tables. It was previously
reachable only as a session setting, so it could not be tuned per query.

No breaking renames: erpl_rfc_read_table_batch_budget keeps working and writes the
same value. They are two spellings of one knob, not two knobs.

Both are transport settings, and the test asserts exactly that -- DD02L read at the
default, at a fetch_size small enough to force many extra round-trips, and with
threads=2, compared by symmetric EXCEPT ALL. If a batch boundary could drop or
duplicate a row, that is where it would show.
@jrosskopf
jrosskopf merged commit f1d3fcf into master Aug 31, 2026
53 checks passed
@jrosskopf
jrosskopf deleted the claude/unified-tuning-api branch August 31, 2026 09:52
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