klsince commented on PR #9306:
URL: https://github.com/apache/pinot/pull/9306#issuecomment-1239881053

   > Where is the current tier stored?
   
   It's set when immutable segment is loaded. TieredStorageLoader sets it after 
loading the segment. 
   ```
   ImmutableSegment.getTier() {
       return _segmentDirectory.getTier();
     }
   
   TierBasedSegmentDirectoryLoader.load() {
   ...
      segmentDirectory.setTier(segmentTier);
   ...
   }
   ```
   
   When addOrReplaceSegment() is called, as there is no segment loaded yet, the 
segmentZKMetadata.tier is used to load the segment for the first time on 
server. When reloadSegment() is called, as the segment is loaded by server (and 
we're reloading it), the current tier tracked by the ImmutableSegment object is 
compared with segmentZKMetadata.tier to decide if there is need to move 
indexDir to a new dir before reloading the segment.


-- 
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]

Reply via email to