kroeders commented on issue #10294: URL: https://github.com/apache/druid/issues/10294#issuecomment-698508429
Sure! One alternative would be to filter the servers in CachingClusteredClient to remove invalid servers before selecting servers for query. This is a little bit complicated because the ServerSelector provided from the Timeline is shared between queries, so the set passed to groupSegmentsByServer has to be copied and filtered. There could be something like a ServerFilter that get applied. However, there are changes needed to ServerSelector to allow it to be recreated without certain servers. From what I can tell, segments and related servers are all maintained across queries, so something would have to change around that point to get this functionality. It might be useful to make a general purpose filter that excludes blocked servers for a given query. This could allow more general filtering based on server health, for example. I think adding Query to the pick calls is a pretty unobtrusive way to get this and maybe other filtering as well. It looks like this is all in the same thread, I guess the Query could be put into ThreadLocal storage, but then there are questions about when to clean up that data. ---------------------------------------------------------------- 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: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
