gianm commented on a change in pull request #6888: Fix num_rows in sys.segments
URL: https://github.com/apache/incubator-druid/pull/6888#discussion_r252825609
##########
File path:
sql/src/main/java/org/apache/druid/sql/calcite/schema/DruidSchema.java
##########
@@ -111,7 +112,7 @@
// 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
private final Map<String, TreeMap<DataSegment, SegmentMetadataHolder>>
segmentMetadataInfo = new HashMap<>();
Review comment:
Instead of this comment, you could add `@GuardedBy("lock")`. It sends the
same message, and could also help with automated bug detection.
----------------------------------------------------------------
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]