raghavyadav01 commented on code in PR #19636:
URL: https://github.com/apache/pinot/pull/19636#discussion_r4078625181
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java:
##########
@@ -1095,11 +1095,14 @@ protected void reloadSegment(SegmentDataManager
segmentDataManager, IndexLoading
}
}
+ /// Reloads a single segment. The passed in config is treated as read-only:
this method pins the segment tier (and
+ /// the table data dir) on a private copy.
@VisibleForTesting
- public void reloadSegment(String segmentName, IndexLoadingConfig
indexLoadingConfig, SegmentZKMetadata zkMetadata,
- SegmentMetadata localMetadata, boolean forceDownload)
+ public void reloadSegment(String segmentName, IndexLoadingConfig
tableIndexLoadingConfig,
+ SegmentZKMetadata zkMetadata, SegmentMetadata localMetadata, boolean
forceDownload)
throws Exception {
String segmentTier = getSegmentCurrentTier(segmentName);
Review Comment:
Could we add a regression test at this level too? The copy-constructor tests
cover the copy itself, but nothing fails today if this line gets dropped.
Reloading two segments on different tiers concurrently reproduces the original
NPE, and even just asserting the passed-in config still has a null segment tier
after the call would lock the contract in.
--
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]