murblanc opened a new pull request #2390:
URL: https://github.com/apache/lucene-solr/pull/2390


   This refactoring is inserting a layer of abstraction 
(`CollectionCommandContext`) between Collection API commands and the 
`OverseerCollectionMessageHandler`, to enable future changes where Collection 
API messages are executed outside of Overseer.
   
   There are (almost) no other changes in this PR. Two exceptions: 1. in 
`CreateCollectionCmd`, appropriate conditions were added around recently added 
calls related to Per Replica States collections and 2. a minor fix in test 
`OverseerStatusTest` regarding distributed updates and Overseer stats.
   
   I'd rather this PR not linger around for too long if possible. Given 
`OverseerCollectionMessageHandler` has lost most of its contents, merging in 
new changes is a highly manual process.
   
   This refactoring is intended to eventually enable constructions such as 
shown in the PoC (based on a slightly older snapshot of master). See line [348 
in 
CollectionsHandler](https://github.com/murblanc/lucene-solr/commit/10cdad0e2618ea82b2b97f4a78cc0f3ff8df8082#diff-582348d44491dcb0ce1dfb169fb544e9e95620b2d0448eb1a1744f4e8dd5a349R348)
 there, when a request is received to create a collection, rather than enqueue 
a ZK message to the Collection API queue for Overseer, the execution is done 
locally in method 
[distributedCollectionCreation](https://github.com/murblanc/lucene-solr/commit/10cdad0e2618ea82b2b97f4a78cc0f3ff8df8082#diff-582348d44491dcb0ce1dfb169fb544e9e95620b2d0448eb1a1744f4e8dd5a349R280).
 This method needs to call the Collection API command, and does not execute in 
the context of the Overseer.
   The motivation for doing the refactoring separately (as discussed in 
[Slack](https://the-asf.slack.com/archives/CEKUCUNE9/p1612908679186300)) is to 
keep the hardest to review part (code moving around) clean of any other changes 
(and a side benefit is that the actual Collection API distribution will take 
quite some time, and having part of it be such a refactoring waiting for a few 
weeks on a branch is a recipe for not being able to merge it safely).


----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to