Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 172421093B for ; Thu, 22 Oct 2015 16:42:12 +0000 (UTC) Received: (qmail 65658 invoked by uid 500); 22 Oct 2015 16:42:12 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 65578 invoked by uid 500); 22 Oct 2015 16:42:11 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 64450 invoked by uid 99); 22 Oct 2015 16:42:11 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2015 16:42:11 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 03C3AE392A; Thu, 22 Oct 2015 16:42:11 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: akuznetsov@apache.org To: commits@ignite.apache.org Date: Thu, 22 Oct 2015 16:42:48 -0000 Message-Id: <81cf2a9478a54fb5bef2a661e9a3f625@git.apache.org> In-Reply-To: <2a16d3a0aa4a4072a5f2139979f416a4@git.apache.org> References: <2a16d3a0aa4a4072a5f2139979f416a4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [39/51] [abbrv] ignite git commit: IGNITE-1740: Node id in IGFS file lock id. 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/ignite-1753 Commit: f619e094356959cf749243989e3c3c17daf93d50 Parents: 75fb19d Author: iveselovskiy Authored: Tue Oct 20 15:49:21 2015 +0300 Committer: thatcoach 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()); } /**