github-actions[bot] commented on code in PR #69769:
URL: https://github.com/apache/doris/pull/69769#discussion_r4400234669
##########
be/src/storage/index/inverted/snii/format/prx_pod.cpp:
##########
@@ -555,9 +637,8 @@ Status build_prx_window_auto_from_flat(std::span<const
uint32_t> positions_flat,
testing::note_prx_raw_build();
RETURN_IF_ERROR(zstd_compress(plain.view(), zstd_level,
&compressed));
}
- const AutoPrxCodecChoice choice = select_auto_prx_codec(
- payload.size(), plain.size(), compressed.size(),
has_compressed,
- limits.max_uncomp_bytes, limits.zstd_min_saving_percent);
+ const AutoPrxCodecChoice choice = choose_auto_prx_codec(
Review Comment:
[P2] Credit fast-path windows to the per-index budget
The new budget only sees windows that reach `choose_auto_prx_codec`, but
this builder emits singleton RAW and sub-512-byte PFOR windows without reaching
that call; `choose_position_codec` has the same bypasses in the replayable
path. Their committed frames therefore supply neither budget bytes nor warmup
observations, so indexes with many short posting lists unnecessarily keep later
windows as zstd even when their faster frames fit the 8% index budget. For
example, 64 singleton `{7}` frames contribute 576 bytes; for the 900-byte zstd
/ 1000-byte PFOR choice used in the new selector test, those bytes raise the
allowance from 72 to 118, enough for the 100-byte trade, but the current writer
ignores them. Record each successfully emitted fast-path frame with
`PrxZstdBudget::add` in both encoders, and cover a short-window prefix followed
by compressible windows through the writer rather than only calling `add`
directly.
--
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]