mcvsubbu commented on a change in pull request #4954: Support schema evolution
for consuming segments
URL: https://github.com/apache/incubator-pinot/pull/4954#discussion_r368327053
##########
File path:
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManager.java
##########
@@ -194,7 +198,17 @@ private void reloadSegment(String tableNameWithType,
SegmentMetadata segmentMeta
File indexDir = segmentMetadata.getIndexDir();
if (indexDir == null) {
- LOGGER.info("Skip reloading REALTIME consuming segment: {} in table:
{}", segmentName, tableNameWithType);
+ if (!_instanceDataManagerConfig.shouldReloadConsumingSegment()) {
+ LOGGER.info("Skip reloading REALTIME consuming segment: {} in table:
{}", segmentName, tableNameWithType);
+ return;
+ }
+ LOGGER.info("Try reloading REALTIME consuming segment: {} in table: {}",
segmentName, tableNameWithType);
+ SegmentMetadataImpl segmentMetadataImpl = (SegmentMetadataImpl)
segmentMetadata;
Review comment:
I would bypass the references to DefaultColumnAction class altogether. Since
we have a handle to the mutable index, just call the addExtraColumns API with
the new schema. Just make sure that API handles well if we call it multiple
times, either with same set of columns or newer ones than the previous time.
Agreed with your observation that this _is_ the reload API. It makes me
think that reload API should be implemented as a part of the segment API, but
that is a HUGE change, and I am not sure what else is involved there (and why
it was done this way as a static method like ImmutableSegment.reload()). So,
let us not go into that.
----------------------------------------------------------------
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]