Jackie-Jiang commented on code in PR #20279:
URL: https://github.com/apache/pinot/pull/20279#discussion_r4593679244
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java:
##########
@@ -347,6 +347,11 @@ public MultiColumnTextMetadata
getMultiColumnTextMetadata() {
if (vectorIndexConfig.isEnabled()) {
// A vector column holds one value per dimension, which may exceed the
default cap
contextBuilder.withMaxNumMultiValues(vectorIndexConfig.getVectorDimension());
+ } else if (!fieldSpec.isSingleValueField()) {
+ Integer maxNumMultiValues =
indexConfigs.getConfig(StandardIndexes.forward()).getMaxNumMultiValues();
Review Comment:
[P2] Apply explicitly configured limits to batch ingestion as well
This is the only production read of the new limit. With
`maxNumMultiValues=4096`, realtime rejects a 4,097-value row, but batch
ingestion still accepts it: `SegmentColumnarIndexCreator` passes the whole
array to the index creators, and `ForwardIndexCreatorFactory` uses the observed
maximum only for sizing. This is a scope gap rather than a regression, since
batch was already unlimited.
Could we validate the observed maximum against the configured limit in
`BaseSegmentCreator.createColIndexCreators`, before creating indexes? That
shared point has both the column statistics and resolved configuration, and
covers row-major and column-major builds. I would initially enforce explicit
overrides in batch, preserve the vector-dimension handling, and keep the
existing behavior when the setting is absent; imposing the realtime default of
1,000 would newly reject existing batch jobs and rebuilds. Please add
limit/limit+1 coverage for dictionary and raw encoding.
##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/ForwardIndexConfig.java:
##########
@@ -218,6 +225,11 @@ private ForwardIndexConfig(@JsonProperty("disabled")
@Nullable Boolean disabled,
_targetMaxChunkSizeBytes =
targetMaxChunkSize == null ? _defaultTargetMaxChunkSizeBytes : (int)
DataSizeUtils.toBytes(targetMaxChunkSize);
_targetDocsPerChunk = targetDocsPerChunk == null ?
_defaultTargetDocsPerChunk : targetDocsPerChunk;
+ Preconditions.checkArgument(
+ maxNumMultiValues == null || (maxNumMultiValues > 0 &&
maxNumMultiValues <= MAX_SUPPORTED_NUM_MULTI_VALUES),
Review Comment:
[P1] Validate the limit against the effective raw writer settings
The 65,536 bound is only safe for the default chunk settings. A RAW LONG
column with `maxNumMultiValues=65536`, `rawIndexWriterVersion=3`,
`targetDocsPerChunk=4096`, and the default `deriveNumDocsPerChunk=false`
accepts a 65,536-element row during realtime ingestion. At sealing,
`MultiValueFixedByteRawIndexCreator` and `VarByteChunkForwardIndexWriter`
calculate `4096 * (4 + 4 + 65536 * 8) = 2,147,516,416` bytes, which
`BaseChunkForwardIndexWriter` rejects with `Chunk size limited to 2GB`. The
converter uses the same table configuration, so the segment cannot be built and
committed. Previously the 1,000-value cap rejected this row before writes.
Please validate the limit against the effective writer version, chunk
settings, and data type before consumption, or constrain the immutable writer's
chunk size. A mutable-to-immutable conversion test for this boundary would
cover the failure.
--
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]