suneet-s commented on code in PR #12456:
URL: https://github.com/apache/druid/pull/12456#discussion_r853117087
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/DruidSchema.java:
##########
@@ -825,6 +837,14 @@ Map<SegmentId, AvailableSegmentMetadata>
getSegmentMetadataSnapshot()
return segmentMetadata;
}
+ /**
+ * @return segmentMetadataInfo. Callers can only safely read the contents of
the map.
+ */
+ public ConcurrentHashMap<String, ConcurrentSkipListMap<SegmentId,
AvailableSegmentMetadata>> getSegmentMetadataInfoUnsafe()
Review Comment:
> should we return a copy of the map rather than the actual?
Yeah, I think that's the right thing to do. I will have to think about
whether or not each thread should get it's own copy of the map or if it's
better to just keep a single copy for reading and share that among threads.
--
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]