bruno-roustant commented on a change in pull request #608:
URL: https://github.com/apache/solr/pull/608#discussion_r804447602
##########
File path: solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java
##########
@@ -176,14 +176,18 @@ private SolrIndexWriter(SolrCore core, String name,
String path, Directory direc
}
}
+ public static void setCommitData(IndexWriter iw, long commitCommandVersion) {
+ setCommitData(iw, commitCommandVersion, null);
+ }
+
@SuppressForbidden(reason = "Need currentTimeMillis, commit time should be
used only for debugging purposes, " +
" but currently suspiciously used for replication as well")
- public static void setCommitData(IndexWriter iw, long commitCommandVersion) {
- log.debug("Calling setCommitData with IW:{} commitCommandVersion:{}", iw,
commitCommandVersion);
- final Map<String,String> commitData = new HashMap<>();
- commitData.put(COMMIT_TIME_MSEC_KEY,
String.valueOf(System.currentTimeMillis()));
- commitData.put(COMMIT_COMMAND_VERSION,
String.valueOf(commitCommandVersion));
- iw.setLiveCommitData(commitData.entrySet());
+ public static void setCommitData(IndexWriter iw, long commitCommandVersion,
Map<String, String> commitData) {
Review comment:
I would prefer to keep the building here as we always want to add this
Solr-internal data. As I see it, CommitUpdateCommand is the user command, it
could be error-prone to have these internal params in CommitUpdateCommand.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]