Return-Path: X-Original-To: apmail-ignite-dev-archive@minotaur.apache.org Delivered-To: apmail-ignite-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EF560187D1 for ; Mon, 23 Nov 2015 23:52:51 +0000 (UTC) Received: (qmail 71555 invoked by uid 500); 23 Nov 2015 23:52:51 -0000 Delivered-To: apmail-ignite-dev-archive@ignite.apache.org Received: (qmail 71471 invoked by uid 500); 23 Nov 2015 23:52:51 -0000 Mailing-List: contact dev-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 dev@ignite.apache.org Received: (qmail 71459 invoked by uid 99); 23 Nov 2015 23:52:51 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2015 23:52:51 +0000 Received: from mail-ob0-f179.google.com (mail-ob0-f179.google.com [209.85.214.179]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 6DE8B1A009C for ; Mon, 23 Nov 2015 23:52:51 +0000 (UTC) Received: by obbww6 with SMTP id ww6so544716obb.0 for ; Mon, 23 Nov 2015 15:52:50 -0800 (PST) X-Gm-Message-State: ALoCoQmXRbS69vaTpasFt4Q+zJP2igbnqx+/oiWfzT5da+JFpSb5n4v9vUbWXM9XlpsF3tir+pmw X-Received: by 10.60.135.68 with SMTP id pq4mr18176171oeb.7.1448322770659; Mon, 23 Nov 2015 15:52:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.202.78.131 with HTTP; Mon, 23 Nov 2015 15:52:11 -0800 (PST) In-Reply-To: <20151123200035.GR4878@tpx> References: <20151123200035.GR4878@tpx> From: Dmitriy Setrakyan Date: Tue, 24 Nov 2015 02:52:11 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Igfs PURGE events: do we need them? To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=047d7b417ff944172e05253dec58 --047d7b417ff944172e05253dec58 Content-Type: text/plain; charset=UTF-8 Cos, The main reason soft delete was added is performance. Without soft-delete, the delete operation would have to wait until a file is fully deleted from a folder, which may take time. As far as secondary FS handling it, IGFS does not require a secondary FS, so we should account for cases when IGFS is running stand-alone. Thoughts? D. On Mon, Nov 23, 2015 at 11:00 PM, Konstantin Boudnik wrote: > Let me ask a different question: what's the point of having the concept of > TRASH? > > Here's an example why I think the 'soft' delete would only complicate > thing. > Suppose IGFS is sitting on top of HDFS and both have 'Trash' enabled. Now, > the file is getting soft-deleted from IGFS and is moved to TRASH folder. > But > in HDFS it is also a move to a place which doesn't have any special meaning > for HDFS. > > Even worst, if IFGS TRASH is linked to HDFS .Trash. HDFS has it's own > policy > on how to clean that up, which is likely to be different from that on IGFS. > Often enough, HDFS .Trash is simply disabled. This discrepancy is going to > create a situation when a file should still be in TRASH, but the secondary > FS > has already purged it. > > And what if yet another secondary file system like S3 has yet another > policy > around their own trash, which they don't even have, I believe? > > Where I am going with this is pretty straight forward: let's drop the > soft-delete support and let the secondary FS to deal with it. If there's no > secondary FS configured - the content of deleted file will have to > retrieved > by other means. > > Thoughts? > Cos > > On Fri, Nov 20, 2015 at 07:15PM, Ivan V. wrote: > > Hi, dev, > > need opinions on the question discussed in > > https://issues.apache.org/jira/browse/IGNITE-1679 (IGFS: Purge event is > > inconsistent). > > In short: in Igfs we have "soft" delete that moves the deleted file or > > folder to special "TRASH" folder. > > Special async worker walks inside TRASH and removes the items > permanently. > > When an item is completely removed, an event of type > > org.apache.ignite.events.EventType#EVT_IGFS_FILE_PURGED is fired. > > But such events are now fired only for files, and only in case if such > file > > was deleted itself, but not a part of a folder sub-tree. It's quite > obvious > > that such behavior is not quite consistent, so we should either get rid > of > > PURGE events at all, or make them consistent. > > In the latter case it would be good to have answer to the question: what > > are real use cases when we may need the purge events ? (Now they seem to > > be used in tests only). > > If we don't have such real use cases, are there any objections to get rid > > of the purge events at all? > > Thanks in advance. > --047d7b417ff944172e05253dec58--