You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/08/12 00:41:27 UTC

[GitHub] [pinot] jtao15 commented on a change in pull request #7289: Fix MergeRollupTask uploading segments not updating their metadata

jtao15 commented on a change in pull request #7289:
URL: https://github.com/apache/pinot/pull/7289#discussion_r687285659



##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/api/upload/ZKOperator.java
##########
@@ -214,14 +216,34 @@ private void processNewSegment(SegmentMetadata segmentMetadata, URI finalSegment
             .info("Moved segment {} from temp location {} to {}", segmentName, currentSegmentLocation.getAbsolutePath(),
                 finalSegmentLocationURI.getPath());
       } catch (Exception e) {
-        LOGGER.error("Could not move segment {} from table {} to permanent directory", segmentName, tableNameWithType, e);
+        LOGGER
+            .error("Could not move segment {} from table {} to permanent directory", segmentName, tableNameWithType, e);
         throw new RuntimeException(e);
       }
     } else {
       LOGGER.info("Skipping segment move, keeping segment {} from table {} at {}", segmentName, tableNameWithType,
           zkDownloadURI);
     }
     _pinotHelixResourceManager.addNewSegment(tableNameWithType, segmentMetadata, zkDownloadURI, crypter);
+
+    // Update zk metadata customer map for offline table
+    String segmentZKMetadataCustomMapModifierStr =
+        headers.getHeaderString(FileUploadDownloadClient.CustomHeaders.SEGMENT_ZK_METADATA_CUSTOM_MAP_MODIFIER);
+    if (TableType.OFFLINE == TableNameBuilder.getTableTypeFromTableName(tableNameWithType)

Review comment:
       Yes, we need to use `OfflineSegmentZKMetadata` here because currently we cant initialize `SegmentZKMetadata`. #7255 should fix this.




-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org