sylph-eu commented on code in PR #10746:
URL: https://github.com/apache/pinot/pull/10746#discussion_r1188939540
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -2268,10 +2271,30 @@ public void assignTableSegment(String
tableNameWithType, String segmentName) {
try {
TableConfig tableConfig = getTableConfig(tableNameWithType);
Preconditions.checkState(tableConfig != null, "Failed to find table
config for table: " + tableNameWithType);
+
Map<InstancePartitionsType, InstancePartitions> instancePartitionsMap =
fetchOrComputeInstancePartitions(tableNameWithType, tableConfig);
+
+ // Initialize tier information only in case direct tier assignment is
configured
+ if (_enableTieredSegmentAssignment &&
CollectionUtils.isNotEmpty(tableConfig.getTierConfigsList())) {
+ List<Tier> sortedTiers =
TierConfigUtils.getSortedTiersForStorageType(tableConfig.getTierConfigsList(),
+ TierFactory.PINOT_SERVER_STORAGE_TYPE, _helixZkManager);
+
+ // Update segment tier to support direct assignment for multiple data
directories
+ updateSegmentTargetTier(tableNameWithType, segmentName, sortedTiers);
+
+ InstancePartitions tierInstancePartitions =
+
TierConfigUtils.getTieredInstancePartitionsForSegment(tableNameWithType,
sortedTiers, segmentName,
+ _helixZkManager);
+ if (tierInstancePartitions != null &&
TableNameBuilder.isOfflineTableResource(tableNameWithType)) {
+ // Override instance partitions for offline table
Review Comment:
Added `info` comment, listing new instance partitions, segment, and a table.
--
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]