noob-se7en commented on code in PR #15641:
URL: https://github.com/apache/pinot/pull/15641#discussion_r2068954594


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java:
##########
@@ -1323,6 +1323,9 @@ private void closePartitionMetadataProvider() {
         _partitionMetadataProvider.close();
       } catch (Exception e) {
         _segmentLogger.warn("Could not close stream metadata provider", e);
+      } finally {
+        // Clear reference so future offset fetches recreate a fresh provider
+        _partitionMetadataProvider = null;

Review Comment:
   If we are setting it to null, it can be created by mutltiple threads. So we 
might have to synchronise createPartitionMetadataProvider



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