deepthi912 commented on code in PR #17458:
URL: https://github.com/apache/pinot/pull/17458#discussion_r2677587620
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ConcurrentMapPartitionUpsertMetadataManager.java:
##########
@@ -268,18 +268,21 @@ protected void
revertCurrentSegmentUpsertMetadata(IndexSegment oldSegment, Threa
oldSegment.getSegmentName());
for (Map.Entry<Object, RecordLocation> obj :
_previousKeyToRecordLocationMap.entrySet()) {
IndexSegment prevSegment = obj.getValue().getSegment();
+ IndexSegment currentLocation = obj.getValue().getSegment();
if (prevSegment != null) {
- try (UpsertUtils.RecordInfoReader recordInfoReader = new
UpsertUtils.RecordInfoReader(prevSegment,
- _primaryKeyColumns, _comparisonColumns, _deleteRecordColumn)) {
- int newDocId = obj.getValue().getDocId();
- int currentDocId =
_primaryKeyToRecordLocationMap.get(obj.getKey()).getDocId();
- RecordInfo recordInfo = recordInfoReader.getRecordInfo(newDocId);
- replaceDocId(prevSegment, prevSegment.getValidDocIds(),
prevSegment.getQueryableDocIds(), oldSegment,
- currentDocId, newDocId, recordInfo);
- } catch (IOException e) {
- throw new RuntimeException(e);
+ if (currentLocation == oldSegment) {
Review Comment:
My Bad, I had modified the change to get the current location, this pointed
to the prev location map. Pushed the changes locally.
--
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]