leventov commented on a change in pull request #7838: Improve IncrementalIndex
concurrency scalability
URL: https://github.com/apache/incubator-druid/pull/7838#discussion_r295935378
##########
File path:
processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndex.java
##########
@@ -624,46 +626,67 @@ IncrementalIndexRowResult toIncrementalIndexRow(InputRow
row)
if (row.getTimestampFromEpoch() < minTimestamp) {
throw new IAE("Cannot add row[%s] because it is below the
minTimestamp[%s]", row, DateTimes.utc(minTimestamp));
}
- final List<String> rowDimensions = row.getDimensions();
+ DimensionData prevDimensionData = this.dimensions.get();
+ RowDimsKeyComponents dimsKeyComponents = getRowDimsKeyComponents(row,
prevDimensionData);
+ DimensionData dimensionData = dimsKeyComponents.getUpdatedDimensionData();
+ while (dimensionData != null &&
!dimensions.compareAndSet(prevDimensionData, dimensionData)) {
Review comment:
It's not documented what does it mean for `dimensionData` to be null here.
Please add a Javadoc comment to `RowDimsKeyComponents`'s field.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]