You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2016/09/21 06:05:26 UTC

[1/2] lucene-solr:branch_6x: SOLR-9524: SolrIndexSearcher.getIndexFingerprint uses dubious synchronization

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x df1a2180a -> fdbeee974


SOLR-9524: SolrIndexSearcher.getIndexFingerprint uses dubious synchronization


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7a1e6efa
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7a1e6efa
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7a1e6efa

Branch: refs/heads/branch_6x
Commit: 7a1e6efa9678f9cdfb3f59f61fba6e60e725f3a7
Parents: f96017d
Author: Noble Paul <no...@apache.org>
Authored: Wed Sep 21 11:29:53 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Wed Sep 21 11:31:25 2016 +0530

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  2 ++
 .../apache/solr/search/SolrIndexSearcher.java   | 23 ++++++++++++--------
 2 files changed, 16 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7a1e6efa/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 79b3cb4..629a288 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -107,6 +107,8 @@ Bug Fixes
 * SOLR-9512: CloudSolrClient will try and keep up with leader changes if its
   state cache points to a down server (Alan Woodward, noble)
 
+* SOLR-9524: SolrIndexSearcher.getIndexFingerprint uses dubious synchronization (Mike Drob, noble)
+
 Optimizations
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7a1e6efa/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
index 52293ff..18ecf3e 100644
--- a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
+++ b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
@@ -36,6 +36,7 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
 
 import com.google.common.base.Function;
 import com.google.common.base.Objects;
@@ -2372,15 +2373,19 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
    * gets a cached version of the IndexFingerprint for this searcher
    **/
   public IndexFingerprint getIndexFingerprint(long maxVersion) throws IOException {
-    IndexFingerprint fingerprint = maxVersionFingerprintCache.get(maxVersion);
-    if (fingerprint != null) return fingerprint;
-    // possibly expensive, so prevent more than one thread from calculating it for this searcher
-    synchronized (maxVersionFingerprintCache) {
-      fingerprint = maxVersionFingerprintCache.get(maxVersionFingerprintCache);
-      if (fingerprint != null) return fingerprint;
-      fingerprint = IndexFingerprint.getFingerprint(this, maxVersion);
-      maxVersionFingerprintCache.put(maxVersion, fingerprint);
-      return fingerprint;
+    final SolrIndexSearcher searcher = this;
+    final AtomicReference<IOException> exception = new AtomicReference<>();
+    try {
+      return maxVersionFingerprintCache.computeIfAbsent(maxVersion, key -> {
+        try {
+          return IndexFingerprint.getFingerprint(searcher, key);
+        } catch (IOException e) {
+          exception.set(e);
+          return null;
+        }
+      });
+    } finally {
+      if (exception.get() != null) throw exception.get();
     }
   }
 


[2/2] lucene-solr:branch_6x: Merge remote-tracking branch 'origin/branch_6x' into branch_6x

Posted by no...@apache.org.
Merge remote-tracking branch 'origin/branch_6x' into branch_6x


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/fdbeee97
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/fdbeee97
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/fdbeee97

Branch: refs/heads/branch_6x
Commit: fdbeee974b443ce4a34cbf71ed5c97a70db9d7fb
Parents: 7a1e6ef df1a218
Author: Noble Paul <no...@apache.org>
Authored: Wed Sep 21 11:35:11 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Wed Sep 21 11:35:11 2016 +0530

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |  36 ++++----
 .../index/TestBackwardsCompatibility.java       |   4 +-
 .../org/apache/lucene/index/index.6.2.1-cfs.zip | Bin 0 -> 15840 bytes
 .../apache/lucene/index/index.6.2.1-nocfs.zip   | Bin 0 -> 15861 bytes
 lucene/common-build.xml                         |   4 +-
 solr/CHANGES.txt                                |  82 ++++++++++---------
 solr/bin/install_solr_service.sh                |  25 ++++--
 solr/bin/solr                                   |  33 ++++++--
 .../solr/client/solrj/impl/CloudSolrClient.java |  51 +++++-------
 .../apache/solr/common/cloud/DocCollection.java |  13 ---
 .../client/solrj/impl/CloudSolrClientTest.java  |  21 +++++
 .../impl/TestCloudSolrClientStateCacheing.java  |  81 ------------------
 .../apache/solr/cloud/MiniSolrCloudCluster.java |  24 ------
 13 files changed, 156 insertions(+), 218 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fdbeee97/solr/CHANGES.txt
----------------------------------------------------------------------
diff --cc solr/CHANGES.txt
index 629a288,2b7a807..a570bea
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@@ -104,11 -70,11 +70,13 @@@ Bug Fixe
  
  * SOLR-9522: Improve error handling in ZKPropertiesWriter (Varun Thacker)
  
- * SOLR-9512: CloudSolrClient will try and keep up with leader changes if its
-   state cache points to a down server (Alan Woodward, noble)
+ * SOLR-8080: bin/solr start script now exits with informative message if using wrong Java version (janhoy)
+ 
+ * SOLR-9475: bin/install_solr_service.sh script got improved detection of Linux distro, especially within
+   virtualized/Docker environment through parsing of /etc/*-release files. Now also supports CentOS. (janhoy)
  
 +* SOLR-9524: SolrIndexSearcher.getIndexFingerprint uses dubious synchronization (Mike Drob, noble)
 +
  Optimizations
  ----------------------