jihoonson commented on a change in pull request #6888: Fix num_rows in sys.segments URL: https://github.com/apache/incubator-druid/pull/6888#discussion_r255239410
########## File path: sql/src/main/java/org/apache/druid/sql/calcite/schema/DruidSchema.java ########## @@ -107,12 +107,13 @@ // For awaitInitialization. private final CountDownLatch initialized = new CountDownLatch(1); - // Protects access to segmentSignatures, mutableSegments, segmentsNeedingRefresh, lastRefresh, isServerViewInitialized + // Protects access to segmentSignatures, mutableSegments, segmentsNeedingRefresh, lastRefresh, isServerViewInitialized, segmentMetadata private final Object lock = new Object(); // DataSource -> Segment -> SegmentMetadataHolder(contains RowSignature) for that segment. // Use TreeMap for segments so they are merged in deterministic order, from older to newer. - // This data structure need to be accessed in a thread-safe way since SystemSchema accesses it + // This data structure need to be accessed in a thread-safe way via lock Object since segments can be added, + //removed, refreshed or accessed asynchronously Review comment: nit: please add a space after `//`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
