deniskuzZ opened a new pull request, #7014:
URL: https://github.com/apache/hive/pull/7014
### 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:
- 16 writers rewriting 1,966 existing DVs: DV tail after the scan 20.1 ->
4.7 s, MERGE DAG 32.8 -> 17.7 s (-46 %, one run
each; against an earlier session's serial run -36 %);
- 2 writers rewriting 16,254 existing DVs: DV tail 141 s, MERGE DAG 1,521 s
with 8 threads; the serial path took 920 s /
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?
- TestBoundedPreloader (4): the bound, another order of use, an unexpected
key, a failed load.
- TestHiveIcebergDeleteWriter (20, 6 skipped as before): the DV writer with
1 and 4 threads.
- TestHiveIcebergDeletionVectors (36).
- Mutations: an unbounded window fails 2 of TestBoundedPreloader's bound
tests; dropping the preloaded indexes fails
the two 4-thread DV writer tests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]