You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2012/09/26 01:02:14 UTC
svn commit: r1390207 - in /lucene/dev/trunk/solr: CHANGES.txt
core/src/java/org/apache/solr/core/RAMDirectoryFactory.java
test-framework/src/java/org/apache/solr/core/MockDirectoryFactory.java
Author: markrmiller
Date: Tue Sep 25 23:02:14 2012
New Revision: 1390207
URL: http://svn.apache.org/viewvc?rev=1390207&view=rev
Log:
SOLR-3892: Inconsistent locking when accessing cache in CachingDirectoryFactory from RAMDirectoryFactory and MockDirectoryFactory.
Modified:
lucene/dev/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/RAMDirectoryFactory.java
lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/core/MockDirectoryFactory.java
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1390207&r1=1390206&r2=1390207&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Tue Sep 25 23:02:14 2012
@@ -373,6 +373,9 @@ Bug Fixes
* SOLR-3891: CacheValue in CachingDirectoryFactory cannot be used outside of
solr.core package. (phunt via Mark Miller)
+
+* SOLR-3892: Inconsistent locking when accessing cache in CachingDirectoryFactory
+ from RAMDirectoryFactory and MockDirectoryFactory. (phunt via Mark Miller)
Other Changes
----------------------
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/RAMDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/RAMDirectoryFactory.java?rev=1390207&r1=1390206&r2=1390207&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/RAMDirectoryFactory.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/RAMDirectoryFactory.java Tue Sep 25 23:02:14 2012
@@ -36,7 +36,7 @@ public class RAMDirectoryFactory extends
@Override
public boolean exists(String path) {
String fullPath = new File(path).getAbsolutePath();
- synchronized (DirectoryFactory.class) {
+ synchronized (this) {
CacheValue cacheValue = byPathCache.get(fullPath);
Directory directory = null;
if (cacheValue != null) {
Modified: lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/core/MockDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/core/MockDirectoryFactory.java?rev=1390207&r1=1390206&r2=1390207&view=diff
==============================================================================
--- lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/core/MockDirectoryFactory.java (original)
+++ lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/core/MockDirectoryFactory.java Tue Sep 25 23:02:14 2012
@@ -47,7 +47,7 @@ public class MockDirectoryFactory extend
@Override
public boolean exists(String path) {
String fullPath = new File(path).getAbsolutePath();
- synchronized (DirectoryFactory.class) {
+ synchronized (this) {
CacheValue cacheValue = byPathCache.get(fullPath);
Directory directory = null;
if (cacheValue != null) {