From 775339d78a55b84799b823e23bed38b8f10d794f Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Mon, 12 Dec 2011 15:04:54 +0200 Subject: [PATCH] Allow to configure a shard with no file based data location locking, closes #1535. --- .../org/elasticsearch/index/store/fs/FsDirectoryService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/index/store/fs/FsDirectoryService.java b/src/main/java/org/elasticsearch/index/store/fs/FsDirectoryService.java index 9264e17d748..e475ee099dc 100644 --- a/src/main/java/org/elasticsearch/index/store/fs/FsDirectoryService.java +++ b/src/main/java/org/elasticsearch/index/store/fs/FsDirectoryService.java @@ -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; }