gerlowskija commented on code in PR #1704: URL: https://github.com/apache/solr/pull/1704#discussion_r1242668461
########## 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: IMO making the change itself should probably be a different PR if we do decide to go that route. Those changes tend to break tests, so I try to keep them separate where I can so they're not holding up other work. That said, this probably does impact the discussion we were having here about whether "generation" belongs in the path or as a query param. If we want to support a default generation value, it probably makes less sense to put the generation in the path (since that kindof forces users to provide a value)? What do you think? -- 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