You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2017/01/05 17:58:59 UTC
lucene-solr:branch_6x: SOLR-9928:
MetricsDirectoryFactory::renameWithOverwrite incorrectly calls super (Mike
Drob via ab)
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x fd2c8cb12 -> 60da846b1
SOLR-9928: MetricsDirectoryFactory::renameWithOverwrite incorrectly calls super (Mike Drob via ab)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/60da846b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/60da846b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/60da846b
Branch: refs/heads/branch_6x
Commit: 60da846b14f4d7904db2b4ee74b4cea247c6c572
Parents: fd2c8cb
Author: Andrzej Bialecki <ab...@apache.org>
Authored: Thu Jan 5 18:56:55 2017 +0100
Committer: Andrzej Bialecki <ab...@apache.org>
Committed: Thu Jan 5 18:58:41 2017 +0100
----------------------------------------------------------------------
.../java/org/apache/solr/core/MetricsDirectoryFactory.java | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/60da846b/solr/core/src/java/org/apache/solr/core/MetricsDirectoryFactory.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/MetricsDirectoryFactory.java b/solr/core/src/java/org/apache/solr/core/MetricsDirectoryFactory.java
index 36563b2..c3cdaf7 100644
--- a/solr/core/src/java/org/apache/solr/core/MetricsDirectoryFactory.java
+++ b/solr/core/src/java/org/apache/solr/core/MetricsDirectoryFactory.java
@@ -187,6 +187,14 @@ public class MetricsDirectoryFactory extends DirectoryFactory implements SolrCor
}
@Override
+ public void renameWithOverwrite(Directory dir, String fileName, String toName) throws IOException {
+ if (dir instanceof MetricsDirectory) {
+ dir = ((MetricsDirectory) dir).getDelegate();
+ }
+ in.renameWithOverwrite(dir, fileName, toName);
+ }
+
+ @Override
public Directory get(String path, DirContext dirContext, String rawLockType) throws IOException {
Directory dir = in.get(path, dirContext, rawLockType);
if (dir instanceof MetricsDirectory) {