noblepaul commented on issue #1327: SOLR-13942: /api/cluster/zk/* to fetch raw 
ZK data
URL: https://github.com/apache/lucene-solr/pull/1327#issuecomment-602304139
 
 
   > Not sure I like the magic switch between returning actual data and 
returning a list of metdatata simply based on whether a znode happens to have 
children or not. This is not deterministic. I'd rather have an explicit action, 
e.g. `GET /api/cluster/zookeeper/collections/_children` to list children for a 
node, and let pure `GET <path>` calls always return UTF-8 data. Futher, it must 
be possible to retrieve the metadata of any znode. The existing 
`/admin/zookeeper` API returns both metadata (ctime etc), utf-8 data and 
children in the same response. So consider either a `GET 
/api/cluster/zookeeper/collections/_metadata` call, or putting the metadata in 
HTTP headers `X-solr-zkmeta-ctime: foo`?
   > 
   > An example to show the problem is the `/collections` znode which happens 
to have no children on a clean node after install. Try this:
   > 
   > ```
   > docker run --rm -ti solr:8.4.1 bash
   > solr start -c
   > curl 
"http://localhost:8983/solr/admin/zookeeper?path=/collections&detail=true";
   > ```
   > 
   > It will return `children_count:0`. Your current impl would just return the 
data of that node, i.e. an empty string, but after creating the first 
collection it would return a list, and you'd need to add `leaf=true` to get to 
the data, which is very inconsistent.
   
   I changed it to have 2 paths
   * `/api/cluster/zk-data`
   * `/api/cluster/zk-ls` 
   
   There is no reason for ambiguity

----------------------------------------------------------------
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


With regards,
Apache Git Services

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

Reply via email to