NazerkeBS commented on a change in pull request #23:
URL: https://github.com/apache/solr/pull/23#discussion_r603256195
##########
File path: solr/core/src/java/org/apache/solr/cloud/ZkConfigSetService.java
##########
@@ -266,13 +271,14 @@ public void downloadConfig(String configName, Path dir)
throws IOException {
@Override
public List<String> getAllConfigFiles(String configName) throws IOException {
String zkPath = CONFIGS_ZKNODE + "/" + configName;
- if (!zkPath.startsWith(ZkConfigSetService.CONFIGS_ZKNODE + "/")) {
- throw new IllegalArgumentException("\"" + zkPath + "\" not recognized as
a configset path");
- }
try {
- List<String> filePaths = new LinkedList<>();
- for (String filePath : zkClient.getAllConfigsetFiles(zkPath)) {
- filePaths.add(filePath.replaceAll(zkPath + "/", ""));
+ List<String> filePaths = new ArrayList<>();
+ ZkMaintenanceUtils.traverseZkTree(zkClient, zkPath,
ZkMaintenanceUtils.VISIT_ORDER.VISIT_POST, filePaths::add);
+ filePaths.remove(zkPath);
+ for (int i=0; i<filePaths.size(); i++) {
+ String filePath = filePaths.get(i);
+ assert(filePath.startsWith(zkPath + "/"));
+ filePaths.set(i, filePath.replaceAll(zkPath + "/", ""));
Review comment:
yes, the results start with zkPath (=/configs/configName)
traverseZkTree includes this zkPath (I debugged)
--
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]