Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 553B6172EA for ; Wed, 4 Feb 2015 18:21:24 +0000 (UTC) Received: (qmail 80643 invoked by uid 500); 4 Feb 2015 18:21:24 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 80574 invoked by uid 500); 4 Feb 2015 18:21:24 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 80564 invoked by uid 99); 4 Feb 2015 18:21:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2015 18:21:24 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of uwe@thetaphi.de designates 85.25.204.22 as permitted sender) Received: from [85.25.204.22] (HELO mail.sd-datasolutions.de) (85.25.204.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2015 18:21:20 +0000 Received: from VEGA (unknown [IPv6:2001:1a80:2b02:aa01:8e70:5aff:fed1:75a4]) by mail.sd-datasolutions.de (Postfix) with ESMTPSA id BFA3616F806E0 for ; Wed, 4 Feb 2015 18:20:58 +0000 (UTC) X-NSA-Greeting: Dear NSA, have fun with reading and analyzing this e-mail! From: "Uwe Schindler" To: References: <044c01d04059$7aa49da0$6fedd8e0$@apache.org> <005e01d04084$f88f8380$e9ae8a80$@thetaphi.de> <00f801d040a6$1dcff0a0$596fd1e0$@thetaphi.de> In-Reply-To: Subject: RE: FSDirectory and creating directory Date: Wed, 4 Feb 2015 19:20:57 +0100 Message-ID: <010501d040a7$528469b0$f78d3d10$@thetaphi.de> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQK1DeErtIuxQOTwpvEVxZdq5oX47gKy2GwXAoHZlp4CVEClOwIq4ny6Au09J+uasim+YA== Content-Language: de X-Virus-Checked: Checked by ClamAV on apache.org > On Wed, Feb 4, 2015 at 1:12 PM, Uwe Schindler wrote: > > Hi Robert, > > > > I am fine with any of your comments. We can move this issue to later > releases, I just want that FSDirectory and its subclasses to document = that > they create the directory on its ctor if it does not yet exist. Please = understand > that I want to figure out if this could cause "human" issues, because = I know > people are always complaining about this shit. And I also wanted to be = sure > this causes no problems with read-only filesystems. People will for = sure > complain if they just want to open an indexreader and suddenly the > FSDirectory complains about "I cannot write" instead of "Directory = does not > exist". I understand the reason behind this change: we want the "real" > (canonical path), so NativeFSLockingFactory's stupid internal = Set > works correctly. No worry, I don=E2=80=99t want to change that for 5.0 = - only > document it! But we can think in later Lucene releases to go back to = not > creating the directory on front under read-only conditions (opening an > IndexReader). > > > > Should I add those Javadocs, costs me not much, I just wanted to = check this > out before? In fact I would move the comment you added to the = Javadocs of > ctor and open() with an additional sentence. >=20 > I don't mind if you change the javadocs, or handle exception from > Files.createDirectories() differently (e.g. in case creation fails). >=20 > Just remember, people will for sure complain if they just want to open = an > indexwriter and make a new index and suddenly FSDirectory complains > about "Directory does not exist" instead of "I cannot write" >=20 > :) I will just change the Javadocs, so nobody can complain about that. I also removed the bogus comment in 4.10 - which claimed the opposite = what really happened. This caused most trouble, because the Lucene.NET = people did not understand what was going wrong there and they tried to = implement what the comment said. And to me it was also a "WTF?" issue = :-) Uwe --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org