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:00:23 UTC

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

Repository: lucene-solr
Updated Branches:
  refs/heads/master e0125c99d -> 3acfa08ae


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/afc57347
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/afc57347
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/afc57347

Branch: refs/heads/master
Commit: afc57347b47322290d6b0e6c00e4e3413ce2fbf0
Parents: 3d13009
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:29:53 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/afc57347/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index d1d9cfb..9b34d33 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -137,6 +137,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/afc57347/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 4c18809..0dec53e 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;
@@ -2384,15 +2385,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:master: Merge remote-tracking branch 'origin/master'

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


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

Branch: refs/heads/master
Commit: 3acfa08aea83235eca7256db5ce9e7ada607be9a
Parents: afc5734 e0125c9
Author: Noble Paul <no...@apache.org>
Authored: Wed Sep 21 11:30:14 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Wed Sep 21 11:30:14 2016 +0530

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |  36 ++++----
 .../index/TestBackwardsCompatibility.java       |   4 +-
 .../org/apache/lucene/index/index.6.2.1-cfs.zip | Bin 0 -> 15851 bytes
 .../apache/lucene/index/index.6.2.1-nocfs.zip   | Bin 0 -> 15845 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/3acfa08a/solr/CHANGES.txt
----------------------------------------------------------------------
diff --cc solr/CHANGES.txt
index 9b34d33,ace9a10..cdaf3fd
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@@ -134,11 -100,11 +100,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
  ----------------------