Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-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 095F91155E for ; Tue, 2 Sep 2014 16:37:06 +0000 (UTC) Received: (qmail 53862 invoked by uid 500); 2 Sep 2014 16:37:00 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 53826 invoked by uid 500); 2 Sep 2014 16:37:00 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 53581 invoked by uid 99); 2 Sep 2014 16:36:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2014 16:36:59 +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 sslavic@gmail.com designates 74.125.82.170 as permitted sender) Received: from [74.125.82.170] (HELO mail-we0-f170.google.com) (74.125.82.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2014 16:36:54 +0000 Received: by mail-we0-f170.google.com with SMTP id p10so7277203wes.15 for ; Tue, 02 Sep 2014 09:36:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=mj9aigeVyY6Tf+yqLUaPtjFi7YdDmDJmGAfOlNut3iI=; b=v4/ivzsZhVqGBmm/sm7HJiof2BE9KEjms6wQgWGHeJqzirMnbZcsAJCKv2TA/iWWwN 0YJihvIqum9MF/5fSjwf5hiGU7lq38MFY1IFYUkIuXGHL7XAIL9cVKmgwHXgFCN7OcRB af3lj/Ud4a+sSZJ8zsbY4S08GJ7DlmNI0tb6Ojn8qiWscfW4mrFKaDP5/cCjOInMUlIn BbGNqTRkJzm1bkSFUK2MjGuA2gPmSidVtoHlNLAZUiHYv+KjQrvYx35PWQmjACe56ch5 yAHQK9M5MXVDuiDzLnSquilwCh9NW7IKcnPhmUlY4HbumesxclMFLHf0cpVLOLiNX8nu wXaQ== MIME-Version: 1.0 X-Received: by 10.194.174.4 with SMTP id bo4mr16587630wjc.84.1409675793509; Tue, 02 Sep 2014 09:36:33 -0700 (PDT) Received: by 10.194.46.195 with HTTP; Tue, 2 Sep 2014 09:36:33 -0700 (PDT) In-Reply-To: References: Date: Tue, 2 Sep 2014 18:36:33 +0200 Message-ID: Subject: Re: Log dir locked after ZK shutdown From: =?UTF-8?Q?Stevo_Slavi=C4=87?= To: user Content-Type: multipart/alternative; boundary=089e013d0c7aebb2fa050217b8e5 X-Virus-Checked: Checked by ClamAV on apache.org --089e013d0c7aebb2fa050217b8e5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Found out through experiment - after shoutdown I also had to close ZK server database. I wonder why isn't this part of the server shutdown? ZooKeeperServer shutdown currently (ZK 3.4.6) calls only clear on database. Kind regards, Stevo Slavic. On Tue, Sep 2, 2014 at 5:19 PM, Stevo Slavi=C4=87 wrote= : > Hello ZooKeeper community, > > In ZK (3.4.6) related tests, if I try to delete ZK data directory > immediatelly after calling shutdown on server connection factory, only on > Windows I get an IOException that a file could not be deleted. On Linux a= nd > Mac same code works well. > > I'm creating a temporary director using Java 7 > Files.createTempDirectory("zookeeper-") > resulting in directory similar to the following: > > C:\Users\Foo\AppData\Local\Temp\zookeeper-4563523978878660799\ > > Then ZooKeeper is configured to use this as data directory. > > To delete it I'm using FileUtils.deleteDirectory from commons-io (2.4) > It walks the directory tree cleaning it up. It fails deleting log file > > > C:\Users\Foo\AppData\Local\Temp\zookeeper-4563523978878660799\version-2\l= og.1 > > Is there something else I have to call to make sure > ZooKeeperServer/ServerCnxnFactory is stopped and released all locks? > If not, is this a known bug/feature? > > > Kind regards, > Stevo Slavic. > --089e013d0c7aebb2fa050217b8e5--