ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [5/9] ignite git commit: WIP.
Date Tue, 15 Mar 2016 20:11:43 GMT
WIP.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/09b2cb47
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/09b2cb47
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/09b2cb47

Branch: refs/heads/ignite-2817
Commit: 09b2cb47774a5c31a55f5283232e87818fdd161f
Parents: 2259757
Author: thatcoach <ppozerov@list.ru>
Authored: Tue Mar 15 22:33:02 2016 +0300
Committer: thatcoach <ppozerov@list.ru>
Committed: Tue Mar 15 22:33:02 2016 +0300

----------------------------------------------------------------------
 .../processors/igfs/IgfsMetaManager.java         | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/09b2cb47/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 e24073a..d6ad5e8 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
@@ -1175,7 +1175,7 @@ public class IgfsMetaManager extends IgfsManager {
                     if (victimInfo.isFile())
                         // Update a file info of the removed file with a file path,
                         // which will be used by delete worker for event notifications.
-                        id2InfoPrj.invoke(victimId, new UpdatePath(path));
+                        invokeUpdatePath(victimId, path);
 
                     tx.commit();
 
@@ -1881,6 +1881,19 @@ public class IgfsMetaManager extends IgfsManager {
     }
 
     /**
+     * Invoke path update processor.
+     *
+     * @param id File ID.
+     * @param path Path to be updated.
+     * @throws IgniteCheckedException If failed.
+     */
+    private void invokeUpdatePath(IgniteUuid id, IgfsPath path) throws IgniteCheckedException
{
+        assert validTxState(true);
+
+        id2InfoPrj.invoke(id, new UpdatePath(path));
+    }
+
+    /**
      * Invoke some processor and return new value.
      *
      * @param id ID.
@@ -2472,7 +2485,7 @@ public class IgfsMetaManager extends IgfsManager {
                         }
 
                         // Update the deleted file info with path information for delete
worker.
-                        id2InfoPrj.invoke(info.id(), new UpdatePath(path));
+                        invokeUpdatePath(info.id(), path);
 
                         return true; // No additional handling is required.
                     }
@@ -3416,7 +3429,7 @@ public class IgfsMetaManager extends IgfsManager {
 
                                         // Update a file info of the removed file with a
file path,
                                         // which will be used by delete worker for event
notifications.
-                                        id2InfoPrj.invoke(lowermostExistingInfo.id(), new
UpdatePath(path));
+                                        invokeUpdatePath(lowermostExistingInfo.id(), path);
 
                                         // Make a new locked info:
                                         long t = System.currentTimeMillis();


Mime
View raw message