yupeng9 commented on issue #7569: URL: https://github.com/apache/pinot/issues/7569#issuecomment-946360923
okay, I think the issue could be on the iteration of the entire map https://github.com/apache/pinot/blob/7e9ca6a5a4afe0d4e283ac1307c45430e474cbf2/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/PartitionUpsertMetadataManager.java#L243 ``` _primaryKeyToRecordLocationMap.forEach((primaryKey, recordLocation) -> { if (recordLocation.getSegment() == segment) { // Check and remove to prevent removing the key that is just updated _primaryKeyToRecordLocationMap.remove(primaryKey, recordLocation); } }); ``` Perhaps we could build an index of segment-> PKs, or change `_primaryKeyToRecordLocationMap` to a sorted map? -- 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]
