liran-funaro commented on a change in pull request #11898:
URL: https://github.com/apache/druid/pull/11898#discussion_r798378297
##########
File path:
processing/src/main/java/org/apache/druid/segment/incremental/OnheapIncrementalIndex.java
##########
@@ -150,26 +153,36 @@ protected void initAggs(
@Override
protected AddToFactsResult addToFacts(
InputRow row,
- IncrementalIndexRow key,
+ IncrementalIndexRowResult incrementalIndexRowResult,
ThreadLocal<InputRow> rowContainer,
Supplier<InputRow> rowSupplier,
boolean skipMaxRowsInMemoryCheck
) throws IndexSizeExceededException
{
+ IncrementalIndexRow key =
incrementalIndexRowResult.getIncrementalIndexRow();
final List<String> parseExceptionMessages = new ArrayList<>();
final int priorIndex = facts.getPriorIndex(key);
Aggregator[] aggs;
final AggregatorFactory[] metrics = getMetrics();
final AtomicInteger numEntries = getNumEntries();
final AtomicLong sizeInBytes = getBytesInMemory();
+ if
(shouldRowBeRejected(incrementalIndexRowResult.getParseExceptionMessages().size()))
{
+ return new AddToFactsResult(numEntries.get(), sizeInBytes.get(),
parseExceptionMessages);
+ }
if (IncrementalIndexRow.EMPTY_ROW_INDEX != priorIndex) {
aggs = concurrentGet(priorIndex);
doAggregate(metrics, aggs, rowContainer, row, parseExceptionMessages);
+ if (shouldRowBeRejected(parseExceptionMessages.size())) {
+ return new AddToFactsResult(numEntries.get(), sizeInBytes.get(),
parseExceptionMessages);
+ }
Review comment:
Isn't it too late to reject this row at this point? The row was already
aggregated to the existing one.
--
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]