You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/06/10 08:47:51 UTC
[2/3] ignite git commit: IGNITE-3294: Removed unnecessary relaxed
mode switch.
IGNITE-3294: Removed unnecessary relaxed mode switch.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bab3b1b1
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bab3b1b1
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bab3b1b1
Branch: refs/heads/ignite-3294
Commit: bab3b1b179e6a4f937220ecad0b9d0e49289f24e
Parents: 1cb291c
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Jun 10 11:20:32 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Jun 10 11:20:32 2016 +0300
----------------------------------------------------------------------
.../internal/processors/igfs/IgfsMetaManager.java | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/bab3b1b1/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
index 2fb6066..3d82ebd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
@@ -1163,16 +1163,8 @@ public class IgfsMetaManager extends IgfsManager {
IgfsPathIds pathIds = pathIds(path);
- boolean relaxed0 = relaxed;
-
- if (!pathIds.allExists()) {
- if (secondaryFs == null)
- // Return early if target path doesn't exist and we do not have secondary file system.
- return new IgfsDeleteResult(false, null);
- else
- // If path is missing partially, we need more serious locking for DUAL mode.
- relaxed0 = false;
- }
+ if (!pathIds.allExists() && secondaryFs == null)
+ return new IgfsDeleteResult(false, null);
IgniteUuid victimId = pathIds.lastId();
String victimName = pathIds.lastPart();
@@ -1183,7 +1175,7 @@ public class IgfsMetaManager extends IgfsManager {
// Prepare IDs to lock.
SortedSet<IgniteUuid> allIds = new TreeSet<>(PATH_ID_SORTING_COMPARATOR);
- pathIds.addExistingIds(allIds, relaxed0);
+ pathIds.addExistingIds(allIds, relaxed);
IgniteUuid trashId = IgfsUtils.randomTrashId();
@@ -1224,7 +1216,7 @@ public class IgfsMetaManager extends IgfsManager {
}
// Ensure that all participants are still in place.
- if (!pathIds.allExists() || !pathIds.verifyIntegrity(lockInfos, relaxed0)) {
+ if (!pathIds.allExists() || !pathIds.verifyIntegrity(lockInfos, relaxed)) {
// For DUAL mode we will try to update the underlying FS still. Note we do that inside TX.
if (secondaryFs != null) {
boolean res = secondaryFs.delete(path, recursive);