Skip to content

Commit

Permalink
Allow to configure a shard with no file based data location locking, c…
Browse files Browse the repository at this point in the history
…loses #1535.
  • Loading branch information
kimchy committed Dec 12, 2011
1 parent b0b379d commit 775339d
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -45,13 +45,15 @@ public FsDirectoryService(ShardId shardId, @IndexSettings Settings indexSettings
}

protected LockFactory buildLockFactory() throws IOException {
String fsLock = componentSettings.get("fs_lock", "native");
String fsLock = componentSettings.get("lock", componentSettings.get("fs_lock", "native"));
LockFactory lockFactory = NoLockFactory.getNoLockFactory();
if (fsLock.equals("native")) {
// TODO LUCENE MONITOR: this is not needed in next Lucene version
lockFactory = new NativeFSLockFactory();
} else if (fsLock.equals("simple")) {
lockFactory = new SimpleFSLockFactory();
} else if (fsLock.equals("none")) {
lockFactory = NoLockFactory.getNoLockFactory();
}
return lockFactory;
}
Expand Down

0 comments on commit 775339d

Please sign in to comment.