Allow to configure a shard with no file based data location locking, closes #1535.
This commit is contained in:
parent
b0b379dc88
commit
775339d78a
|
@ -45,13 +45,15 @@ public abstract class FsDirectoryService extends AbstractIndexShardComponent imp
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue