It depends on how latest result you want vs how simple you want to make this. 
If you want the very latest segment information, the very recent changes should 
be reflected to the query result. To do so, everything should be mutable and 
lock should be acquired before updating mutable objects. However, I don't think 
this is the case. System schema doesn't change so quickly like hundreds times 
in a second. 

I think it's much better to make `SegmentMetadataHolder` immutable and 
`segmentMetadataInfo` as a normal map. `getSegmentMetadata()` should return an 
immutable map holding the snapshot of `SegmentMetadataHolder` under the `lock`.

[ Full content available at: 
https://github.com/apache/incubator-druid/pull/6094 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to