cpoerschke commented on pull request #601: URL: https://github.com/apache/solr/pull/601#issuecomment-1038967657
> I found the lifecycle of these "proc" instances in this code to not be as clear as I'd like. And I saw that finish() was being called after each document (when parallel replay) which doesn't sound nice, (may cause excessive `fsync`). I also don't love that these proc's would then be created for each doc. So I fixed all these matters by using a ThreadLocal scoped to this processing to hold the proc. They need to be be kept in a list so they can all be `finish()`'ed and `close()`'ed at the end. WDYT? Tests pass. Very nice, thanks! The parallelised and non-parallelised `proc` having the same lifecycle is neat and also the on-demand creation handles the scenario where the non-parallelised `proc` is not required i.e. no DBQ replay. -- 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