You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2014/12/02 17:46:06 UTC
svn commit: r1642946 - in /lucene/dev/trunk/solr: CHANGES.txt
core/src/java/org/apache/solr/update/processor/RunUpdateProcessorFactory.java
Author: yonik
Date: Tue Dec 2 16:46:05 2014
New Revision: 1642946
URL: http://svn.apache.org/r1642946
Log:
SOLR-6776: only clear changesSinceCommit on a hard commit so tlog will still be flushed on a softCommit
Modified:
lucene/dev/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/RunUpdateProcessorFactory.java
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1642946&r1=1642945&r2=1642946&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Tue Dec 2 16:46:05 2014
@@ -509,6 +509,10 @@ Bug Fixes
* SOLR-6796: distrib.singlePass does not return correct set of fields for multi-fl-parameter
requests. (Per Steffensen via shalin)
+* SOLR-6776: Transaction log was not flushed at the end of update requests with softCommit
+ specified, which could lead to data loss if the server were killed immediately after the
+ update finished. (Jeffery Yuan via yonik)
+
Other Changes
----------------------
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/RunUpdateProcessorFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/RunUpdateProcessorFactory.java?rev=1642946&r1=1642945&r2=1642946&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/RunUpdateProcessorFactory.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/RunUpdateProcessorFactory.java Tue Dec 2 16:46:05 2014
@@ -94,7 +94,10 @@ class RunUpdateProcessor extends UpdateR
{
updateHandler.commit(cmd);
super.processCommit(cmd);
- changesSinceCommit = false;
+ if (!cmd.softCommit) {
+ // a hard commit means we don't need to flush the transaction log
+ changesSinceCommit = false;
+ }
}
/**