Code may want to know the role of other nodes (i.e. Someone just sent me a
request to create a collection, where can I put it?). DRY... one source of
truth is all I'm after. Someone changes the file on disk before restarting,
we shouldn't see the change locally but not see it globally, etc.

It's fine if we don't provide any ability for runtime modification of roles
at this time but I'm leery of precluding it in the future.

And yeah it's fine to say that it's not an arbitrary tagging/properties
feature, and should always be associated with a code based functionality.
Also, if code running in another node never needs to know about it (i.e.
the effect of the functionality is entirely local) it doesn't require a
role. Maybe avoid big/small designation as that's pretty subjective.

On Thu, Nov 18, 2021 at 8:48 AM Jan Høydahl <jan....@cominvent.com> wrote:

> 18. nov. 2021 kl. 01:43 skrev Gus Heck <gus.h...@gmail.com>:
>
>
> 2) Roles will not be checked by loading config from disk or caching disk
> config in memory. (zk ONLY source of truth)
>
>
> It sounds a bit backward for a local node to first parse solr.node.roles,
> determine its local set of roles, then publish them to Zookeeper, and then
> read back its own roles from ZK.
> Code that only needs to determine "Do I have the XXX role?" or find out
> "What roles do I have" should be able to fetch the (static) roles from some
> roles utility class without consulting ZK.
> Code that needs to check what nodes have a certain role (such as
> placement) would obviously need ot consult ZK.
>
> Perhaps the SIP should also state some *Non-goals* or assertions such as
> * Roles are static and immutable (also in zk) for the entire life cycle of
> a node
>
> I also think we should state that the bar for adding new roles should be
> high so it is not abused as any other tag or label for any tiny feature. It
> should be reserved for functionality that may benefit from a dedicated set
> of nodes. That may be clear already, but you never know...
>
> Jan
>


-- 
http://www.needhamsoftware.com (work)
http://www.the111shift.com (play)

Reply via email to