dsmiley commented on code in PR #2765: URL: https://github.com/apache/solr/pull/2765#discussion_r1805481104
########## solr/core/src/java/org/apache/solr/update/UpdateLog.java: ########## @@ -2097,10 +2098,19 @@ public void doReplay(TransactionLog translog) { UpdateRequestProcessorChain processorChain = req.getCore().getUpdateProcessingChain(null); Collection<UpdateRequestProcessor> procPool = Collections.synchronizedList(new ArrayList<>()); + final var params = + new MapSolrParams( + Map.of( + DISTRIB_UPDATE_PARAM, + FROMLEADER.toString(), + DistributedUpdateProcessor.LOG_REPLAY, + "true")); Review Comment: This is duplicative with other code in this class; it should be factored out. You can just refer to the very same params of `req`, even use the same immutable variant you just coded here for that. I started looking at why the duplication is there, and I see we create a single req & rsp for the replay as a whole that will be separate from the LocalSolrRequest in the ThreadLocal. The UpdateCommand is created from the parent request but the URP is created from the local request. That feels wrong even if it works. Admittedly it's probably too much scope to refactor (I started locally and it's not trivial). -- 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