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 152DD9A33 for ; Wed, 14 Mar 2012 20:17:57 +0000 (UTC) Received: (qmail 86667 invoked by uid 500); 14 Mar 2012 20:17:54 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 86644 invoked by uid 500); 14 Mar 2012 20:17:54 -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 86636 invoked by uid 99); 14 Mar 2012 20:17:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2012 20:17:54 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tyler@datastax.com designates 209.85.215.44 as permitted sender) Received: from [209.85.215.44] (HELO mail-lpp01m010-f44.google.com) (209.85.215.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2012 20:17:50 +0000 Received: by lagj5 with SMTP id j5so2137842lag.31 for ; Wed, 14 Mar 2012 13:17:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=ocA/icID75HsPb9TrlykCeVJG7w3Fr3LRaO8P4Wp8mU=; b=LDjO4b74k5X+AxhUQYu0OmPoEJmOolWDHkdS6nWKultyoe0Hs88PCCz4mPW6uTm9ky 2DCwlpZ6OYceOAr5seGA2HgcjURuc6xWI0eD6zH/WjjjXo8P1ySXCnXtBoVSZH9lWyz6 ExZ/0K23wlmX8aLEbI45C7WUb7qgPqS0QdxnDKlqaqKEwBay/qzb24Mo3X821/z8jzwd 0HaU3VPQvA5dLRKahIH53pFylGYNiWfvLw3dl6Uy75b1RNINe0waKGh60vWSS6r0i9cD Rn50PqC/CpXHqZxsicuvo6UBeV5w8BDS9iqbnqKnPEUns2mtJe8gorMQIdy7xXdb6c4i HpuA== MIME-Version: 1.0 Received: by 10.112.11.5 with SMTP id m5mr1389584lbb.66.1331756248567; Wed, 14 Mar 2012 13:17:28 -0700 (PDT) Received: by 10.112.24.170 with HTTP; Wed, 14 Mar 2012 13:17:28 -0700 (PDT) In-Reply-To: <4F60F9D8.3080009@referentia.com> References: <4F5FF9DE.1030107@referentia.com> <4F60F9D8.3080009@referentia.com> Date: Wed, 14 Mar 2012 15:17:28 -0500 Message-ID: Subject: Re: snapshot files locked From: Tyler Hobbs To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=e0cb4efe32ac1f8ede04bb39aa7a X-Gm-Message-State: ALoCoQmW+AGxgwqQ8+Tvu3X7KcwdpOsoV4bbCbHALTEsx2g9Rr3U9VSxtkhjdjBXzh7k9fCqlMXz X-Virus-Checked: Checked by ClamAV on apache.org --e0cb4efe32ac1f8ede04bb39aa7a Content-Type: text/plain; charset=ISO-8859-1 Can you open a ticket on https://issues.apache.org/jira/browse/CASSANDRAfor this? On Wed, Mar 14, 2012 at 3:04 PM, Jim Newsham wrote: > > Hi Maki, > > Thanks for the reply. Yes, I understand that snapshots are hard links. > However, 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 the file. To confirm my understanding, I tested this in > Windows by terminating Cassandra and then deleting all files in the > snapshot dir. None of the corresponding files in the parent keyspace > directory were removed. > > Regards, > Jim > > > 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. >> >> maki >> >> 2012/3/14 Jim Newsham >> >: >> >>> Hi, >>> >>> 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 folder >>> or >>> a file in it is open in another program. Close the folder or file and >>> try >>> 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? >>> >>> Thanks, >>> Jim >>> >>> > -- Tyler Hobbs DataStax --e0cb4efe32ac1f8ede04bb39aa7a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Can you open a ticket on https://issues.apache.org/jira/browse/CASSANDRA for this?
=
On Wed, Mar 14, 2012 at 3:04 PM, Jim Newsham= <jnewsham@= referentia.com> wrote:

Hi Maki,

Thanks for the reply. =A0Yes, I understand that snapshots are hard links. = =A0However, my understanding is that removing any hard-linked files just re= moves the link (decrementing the link counter of the file on disk) -- it do= es not delete the file itself nor remove any other links which may be point= ing at the file. =A0To confirm my understanding, I tested this in Windows b= y terminating Cassandra and then deleting all files in the snapshot dir. = =A0None of the corresponding files in the parent keyspace directory were re= moved.

Regards,
Jim


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 de= lete
the sstables in production.

maki

2012/3/14 Jim Newsham<jnewsham@referentia.com>:
Hi,

I'm using Cassandra 1.0.8, on Windows 7. =A0When I take a snapshot of t= he
database, I find that I am unable to delete the snapshot directory (i.e., dir named "{datadir}\{keyspacename}\snapshots\{snapshottag}&quo= t;) while
Cassandra is running: =A0"The action can't be completed because th= e folder or
a file in it is open in another program. =A0Close the folder or file and tr= y
again". =A0If I terminate Cassandra, then I can delete the directory w= ith no
problem. =A0Is there a reason why Cassandra must hold onto these files?

Thanks,
Jim





--
Tyler Hobbs
DataStax
<= br> --e0cb4efe32ac1f8ede04bb39aa7a--