mlbiscoc commented on code in PR #1704:
URL: https://github.com/apache/solr/pull/1704#discussion_r1242757077


##########
solr/core/src/java/org/apache/solr/handler/admin/api/ReplicationAPIBase.java:
##########
@@ -38,10 +68,140 @@ public ReplicationAPIBase(
   }
 
   protected CoreReplicationAPI.IndexVersionResponse doFetchIndexVersion() 
throws IOException {
+    ReplicationHandler replicationHandler =
+        (ReplicationHandler) 
solrCore.getRequestHandler(ReplicationHandler.PATH);
+    return replicationHandler.getIndexVersionResponse();
+  }
 
+  protected NamedList<Object> doFetchFiles(long generation) {
     ReplicationHandler replicationHandler =
         (ReplicationHandler) 
solrCore.getRequestHandler(ReplicationHandler.PATH);
+    return getFileList(generation, replicationHandler);
+  }
 
-    return replicationHandler.getIndexVersionResponse();
+  protected NamedList<Object> getFileList(long generation, ReplicationHandler 
replicationHandler) {
+    final IndexDeletionPolicyWrapper delPol = solrCore.getDeletionPolicy();
+    final NamedList<Object> filesResponse = new NamedList<>();
+
+    IndexCommit commit = null;
+    try {
+      if (generation == -1) {

Review Comment:
   Hmmm I agree it makes less sense to put generation in the path if we decide 
to support a default generation. There doesn't seem to be a clean way to 
generation in the path while also defaulting so if I had to choose, I think 
there is more value in generation being in the query parameter and being able 
to default generation than the other way around. 
   
   I'll modify the API with generation in the query parameter.



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

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to