Jackie-Jiang commented on code in PR #9640:
URL: https://github.com/apache/pinot/pull/9640#discussion_r1007185122
##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManager.java:
##########
@@ -373,16 +369,28 @@ private void reloadSegmentWithMetadata(String
tableNameWithType, SegmentMetadata
File indexDir = segmentMetadata.getIndexDir();
if (indexDir == null) {
+ // Use force commit to reload consuming segment
SegmentDataManager segmentDataManager =
tableDataManager.acquireSegment(segmentName);
if (segmentDataManager == null) {
+ LOGGER.warn("Failed to find segment data manager for table: {},
segment: {}, skipping reloading segment",
+ tableNameWithType, segmentName);
return;
}
try {
- if (reloadMutableSegment(tableNameWithType, segmentName,
segmentDataManager, schema)) {
- // A mutable segment has been found and reloaded.
- segmentDataManager.setLoadTimeMs(System.currentTimeMillis());
+ if (!_instanceDataManagerConfig.shouldReloadConsumingSegment()) {
+ LOGGER.warn("Skip reloading consuming segment: {} in table: {} as
configured", segmentName,
+ tableNameWithType);
return;
}
+ // TODO: Support force committing HLC consuming segment
+ if (!(segmentDataManager instanceof LLRealtimeSegmentDataManager)) {
+ LOGGER.warn("Cannot reload non-LLC consuming segment: {} in table:
{}", segmentName, tableNameWithType);
+ return;
+ }
+ LOGGER.info("Reloading (force committing) LLC consuming segment: {} in
table: {}", segmentName,
+ tableNameWithType);
+ ((LLRealtimeSegmentDataManager) segmentDataManager).forceCommit();
Review Comment:
Yes, it is async. We can only signal the segment to perform the commit
--
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]