You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/05/27 16:47:30 UTC

[GitHub] [incubator-druid] leventov edited a comment on issue #7571: Optimize coordinator API to retrieve segments with overshadowed status

leventov edited a comment on issue #7571: Optimize coordinator API to retrieve segments with overshadowed status
URL: https://github.com/apache/incubator-druid/issues/7571#issuecomment-496264473
 
 
   Regarding interning - we have to get rid of them anyway: #7395 explains how. If a segment first appears in `BrokerServerView`, it can be created as `SegmentWithOvershadowedStatus(isOvershadowed=false)`. Then if it later appears in `MetadataSegmentView` and it is not actually overshadowed, we reuse the existing object by probing `BrokerServerView`. If the arrived object has `isOvershadowed=true`, we just lose the opportunity to deduplicate this segment, but we expect it for the minority of segments, so that's fine.
   
   Regarding `SegmentWithOvershadowedStatus(isOvershadowed=false)` objects in `BrokerServerView` while the actual status is unknown: it seems weird at first glance but it's actually fine. The rule is that to probe `isOvershadowed` status we should *always* go through `MetadataSegmentView`. To guard against misuse, we can prohibit casting to `SegmentWithOvershadowedStatus` in the codebase on the Checkstyle or IntelliJ level.
   
   > What do you mean by 'prohibit' @leventov? I followed the link, and I don't see a suggestion about prohibiting equals and hashCode. (Just about prohibiting using DataSegments as keys in a map, which seems reasonable, given that usually people probably meant to use SegmentId.)
   
   Sorry, I didn't re-check what did I propose there. No, I don't suggest to prohibit.  I suggest exactly what is written in https://github.com/apache/incubator-druid/issues/6358#issuecomment-489102183.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org