deepthi912 commented on code in PR #19028:
URL: https://github.com/apache/pinot/pull/19028#discussion_r3626753050
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java:
##########
@@ -577,15 +592,22 @@ public void replaceSegment(ImmutableSegment segment,
IndexSegment oldSegment) {
}
try {
doReplaceSegment(segment, oldSegment);
- if (!(segment instanceof EmptyIndexSegment)) {
+ if (segment instanceof ImmutableSegmentImpl) {
+ ImmutableSegmentImpl immutableSegment = (ImmutableSegmentImpl) segment;
_trackedSegments.add(segment);
if (_enableSnapshot) {
- _updatedSegmentsSinceLastSnapshot.add(segment);
+ _updatedSegmentsSinceLastSnapshot.add(immutableSegment);
Review Comment:
We can probably extract into a method
_updatedSegmentsSinceLastSnapshot.add(immutableSegment);
if (hasValidDocIdsSnapshotFile(immutableSegment)) {
_segmentsWithSnapshot.add(immutableSegment);
}
--
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]