Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EB7AE99BE for ; Thu, 15 Mar 2012 00:07:26 +0000 (UTC) Received: (qmail 86172 invoked by uid 500); 15 Mar 2012 00:07:24 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 86147 invoked by uid 500); 15 Mar 2012 00:07:24 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 86137 invoked by uid 99); 15 Mar 2012 00:07:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 00:07:24 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of watanabe.maki@gmail.com designates 209.85.210.44 as permitted sender) Received: from [209.85.210.44] (HELO mail-pz0-f44.google.com) (209.85.210.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 00:07:18 +0000 Received: by dakl33 with SMTP id l33so4101571dak.31 for ; Wed, 14 Mar 2012 17:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; bh=Aci2k3FOW5BM38ibhf8fMKtn0YtDXjtTS9gl19XR3pc=; b=D1nUEtoJ0Rhd/HAQFmvTcKCZ+M56s1G9K4rKMMyJuvH8YlUTV0g1H1LxA+5Oz9r9Ir zKRIPep+vPsD8nHgwr3KjGDxhJodwrJiqrIMIuf64ar62nWlIJ6afqzZY1p/TEh6JAlN 5GVMF0M9GNiqm76jEFPyUzONzMv4K/Wn9lm2hpvzH2F1S0pYGzrH/oWJyrGg+/n9iDTo 0yahi0L5Kb8AFngniQN5+QWQoUrpklBpbrkORIy29jgj1AM4in0dfR7ntLVAFzh8o4Wd c5SWmaelFtp7/8VOgBi739GSf1ooj2ApkUpw9MtoxVhLhDJvdoL/okKOcSZ3dQ1T3rgr LBQg== Received: by 10.68.233.98 with SMTP id tv2mr138990pbc.51.1331770017959; Wed, 14 Mar 2012 17:06:57 -0700 (PDT) Received: from [126.188.219.20] (pw126188219020.88.tss.panda-world.ne.jp. [126.188.219.20]) by mx.google.com with ESMTPS id jm4sm466817pbc.73.2012.03.14.17.06.55 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Mar 2012 17:06:57 -0700 (PDT) References: <4F5FF9DE.1030107@referentia.com> <4F60F9D8.3080009@referentia.com> In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <35177E23-2E1B-4020-A634-1C595502D826@gmail.com> Cc: "user@cassandra.apache.org" X-Mailer: iPhone Mail (9B176) From: Watanabe Maki Subject: Re: snapshot files locked Date: Thu, 15 Mar 2012 09:06:49 +0900 To: Watanabe Maki X-Virus-Checked: Checked by ClamAV on apache.org Typo > 2. MKLINK /D LINK.TXT ORIG.TXT MKLINK /H On 2012/03/15, at 9:04, Watanabe Maki wrote: > It's true on unix, but you can't delete hard links of opened files on wind= ows. > Try following: > 1 Create a text file ORIG.TXT > 2. MKLINK /D LINK.TXT ORIG.TXT > Now you have hard link LINK.TXT . > 3 Open ORIG.TXT with MS Word. > 4. DEL LINK.TXT > It returns error. >=20 > Interesting thing is that you can delete link.txt if you open orig.txt wit= h notepad.=20 > Notepad may close file after load, or it may be using different API. >=20 > On 2012/03/15, at 5:04, Jim Newsham wrote: >=20 >>=20 >> Hi Maki, >>=20 >> Thanks for the reply. Yes, I understand that snapshots are hard links. H= owever, my understanding is that removing any hard-linked files just removes= the link (decrementing the link counter of the file on disk) -- it does not= delete the file itself nor remove any other links which may be pointing at t= he file. To confirm my understanding, I tested this in Windows by terminati= ng Cassandra and then deleting all files in the snapshot dir. None of the c= orresponding files in the parent keyspace directory were removed. >>=20 >> Regards, >> Jim >>=20 >> On 3/13/2012 9:29 PM, Maki Watanabe wrote: >>> snapshot files are "hardlink"s of the original sstables. >>> As you know, on windows, you can't delete files opened by other process.= >>> If you try to delete the "hardlink", windows thinks you try to delete >>> the sstables in production. >>>=20 >>> maki >>>=20 >>> 2012/3/14 Jim Newsham: >>>> Hi, >>>>=20 >>>> I'm using Cassandra 1.0.8, on Windows 7. When I take a snapshot of the= >>>> database, I find that I am unable to delete the snapshot directory (i.e= ., >>>> dir named "{datadir}\{keyspacename}\snapshots\{snapshottag}") while >>>> Cassandra is running: "The action can't be completed because the folde= r or >>>> a file in it is open in another program. Close the folder or file and t= ry >>>> again". If I terminate Cassandra, then I can delete the directory with= no >>>> problem. Is there a reason why Cassandra must hold onto these files? >>>>=20 >>>> Thanks, >>>> Jim >>>>=20 >>=20