Repository navigation
Conversation
…rs of its data files one at a time - iceberg.mr.previous.deletes.load.thread.pool.size (default 1, as before): with more, the DV writer loads the previous deletes of its data files on a pool of its own ahead of its merge, which takes them one data file at a time - BoundedPreloader: at most two per thread held ahead, in the order the merge takes them (the DV writer's hash map of paths, mirrored); a data file not loaded ahead is loaded when merged, so what is held stays bounded in any order - Impact (1TRC, 40 x r5d.4xlarge, V3 MERGE, 1 -> 8 threads, same DVs and bytes per pair): 16 writers rewriting 1,966 DVs: DV tail after the scan 20.1 -> 4.7 s, DAG 32.8 -> 17.7 s (-46 %, one run each); 2 writers rewriting 16,254 DVs: tail 141 s, DAG 1,521 s with 8 threads (serial on an earlier image: 920 s / 2,412 s); unbounded preload: same tail - TestBoundedPreloader: bound, another order, an unexpected key, a failed load; TestHiveIcebergDeleteWriter with 1 and 4 threads (a preloaded index dropped fails the 4-thread runs, an unbounded window the bound tests)
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What changes were proposed in this pull request?
iceberg.mr.previous.deletes.load.thread.pool.size (InputFormatConfig, default 1 = the serial path, as before): with more
threads, a V3 DV writer loads the existing deletion vectors of its data files on a pool of its own ahead of its merge,
which still takes them one data file at a time. BoundedPreloader holds at most two per thread ahead, in the order the
merge takes them (the DV writer's hash map of paths, mirrored); a data file not loaded ahead is loaded when merged, so
what is held stays bounded in any order.
Why are the changes needed?
Before it merges, a DV writer loads the existing deletion vectors of each data file it writes deletes for, one file
after another on the task thread (BaseDVFileWriter.close through the engine's loader; Spark and Trino do the same); a
writer that covers thousands of data files spends minutes on this after the scan has finished.
1TRC, 40 x r5d.4xlarge, MERGE into the V3 table, 8 threads vs 1, the same DVs and bytes in each pair:
each; against an earlier session's serial run -36 %);
2,412 s on an earlier image (-85 % / -37 %).
The bound costs nothing measurable: an unbounded preload had the same 2-writer tail (136 s) and DAG (+0.6 %). Deleted
rows verified (742,998 and 5,319,699); each 8-thread writer logged its threads, the serial runs logged no preload.
Does this PR introduce any user-facing change?
A new configuration, iceberg.mr.previous.deletes.load.thread.pool.size, default 1 (no change in behaviour).
How was this patch tested?
the two 4-thread DV writer tests.
🤖 Generated with Claude Code