Hi all,
I noticed recently that Solr has several overlapping APIs for modifying
what it calls "CLUSTERPROPS". I think I understand the purpose of each of
these, but wanted to check here in case anyone had context to confirm or
correct me:
/admin/collections?action=CLUSTERPROP (or POST /api/cluster {set-property:
{...}} in v2 parlance) updates /clusterprops.json in ZooKeeper and can only
be used to modify cluster properties one-at-a-time. [1] [2]
POST /api/cluster {"set-obj-property": {...}} on the other hand (which has
no v1 equivalent) also updates the /clusterprops.json node in ZooKeeper,
but can be used to atomically update multiple properties simultaneously. [3]
My understanding is that there's no difference in these APIs, other than
the latter's ability to update multiple properties atomically - is that
correct? If so, is there any reason to ever use
/admin/collections?action=CLUSTERPROP over its alternative, or do we see
the latter "set-obj-property" API as eventually supercedeing its
predecessor?
Best,
Jason
[1]
https://github.com/apache/solr/blob/02a1ff4b41d4d7abd0c017adc8d49f1a61e1e45b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java#L1041
[2]
https://github.com/apache/solr/blob/f1f32d39ff715ddd325d873203e685655aa268d0/solr/core/src/java/org/apache/solr/handler/ClusterAPI.java#L299
[3]
https://github.com/apache/solr/blob/f1f32d39ff715ddd325d873203e685655aa268d0/solr/core/src/java/org/apache/solr/handler/ClusterAPI.java#L286