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 2015/10/20 14:50:42 UTC
ignite git commit: IGNITE-1740: Node id in IGFS file lock id.
Repository: ignite
Updated Branches:
refs/heads/master 75fb19dee -> f619e0943
IGNITE-1740: Node id in IGFS file lock id.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f619e094
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f619e094
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f619e094
Branch: refs/heads/master
Commit: f619e094356959cf749243989e3c3c17daf93d50
Parents: 75fb19d
Author: iveselovskiy <iv...@gridgain.com>
Authored: Tue Oct 20 15:49:21 2015 +0300
Committer: thatcoach <pp...@list.ru>
Committed: Tue Oct 20 15:49:21 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/igfs/IgfsMetaManager.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/f619e094/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 c016e46..e75fe51 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
@@ -526,7 +526,7 @@ public class IgfsMetaManager extends IgfsManager {
* @return New file info with lock set, or null if the info passed in is already locked.
* @throws IgniteCheckedException In case lock is already set on that file.
*/
- private static @Nullable IgfsFileInfo lockInfo(IgfsFileInfo info, boolean isDeleteLock) {
+ private @Nullable IgfsFileInfo lockInfo(IgfsFileInfo info, boolean isDeleteLock) {
assert info != null;
if (info.lockId() != null)
@@ -537,12 +537,16 @@ public class IgfsMetaManager extends IgfsManager {
/**
* Gets a new lock id.
+ * The returned Id #globalId() method will return the Id of the node which locked the file.
*
* @param isDeleteLock if this is special delete lock.
* @return The new lock id.
*/
- private static IgniteUuid composeLockId(boolean isDeleteLock) {
- return isDeleteLock ? DELETE_LOCK_ID : IgniteUuid.randomUuid();
+ private IgniteUuid composeLockId(boolean isDeleteLock) {
+ if (isDeleteLock)
+ return DELETE_LOCK_ID;
+
+ return IgniteUuid.fromUuid(locNode.id());
}
/**