Return-Path: X-Original-To: apmail-lucenenet-user-archive@www.apache.org Delivered-To: apmail-lucenenet-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 5BD801878A for ; Wed, 7 Oct 2015 04:33:44 +0000 (UTC) Received: (qmail 72607 invoked by uid 500); 7 Oct 2015 04:33:44 -0000 Delivered-To: apmail-lucenenet-user-archive@lucenenet.apache.org Received: (qmail 72564 invoked by uid 500); 7 Oct 2015 04:33:44 -0000 Mailing-List: contact user-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@lucenenet.apache.org Delivered-To: mailing list user@lucenenet.apache.org Received: (qmail 72553 invoked by uid 99); 7 Oct 2015 04:33:43 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Oct 2015 04:33:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6BD40C0CC3 for ; Wed, 7 Oct 2015 04:33:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=6.31 tests=[URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id RYuRyLySv3id for ; Wed, 7 Oct 2015 04:33:36 +0000 (UTC) Received: from bin-vsp-out-02.atm.binero.net (vsp-unauthed02.binero.net [195.74.38.227]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 712D1429AA for ; Wed, 7 Oct 2015 04:33:35 +0000 (UTC) X-Halon-ID: 8c760a0b-6cac-11e5-b25c-005056917f90 Authorized-sender: sisve@devhost.se Received: from Nefarian.local (unknown [46.246.40.153]) by bin-vsp-out-02.atm.binero.net (Halon Mail Gateway) with ESMTPSA; Wed, 7 Oct 2015 06:33:24 +0200 (CEST) Subject: Re: Lucene index reset/cleared after an unexpected powerdown - advice please To: user@lucenenet.apache.org, mark.cranness@orcon.net.nz References: <004301d0fffc$68db5330$3a91f990$@orcon.net.nz> From: Simon Svensson X-Enigmail-Draft-Status: N1110 Message-ID: <5614A096.2050208@devhost.se> Date: Wed, 7 Oct 2015 06:33:26 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <004301d0fffc$68db5330$3a91f990$@orcon.net.nz> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Hi, I believe that this would be due to https://issues.apache.org/jira/browse/LUCENE-3418 assuming that Lucene.Net has the exact same behavior as Lucene 3.0.3. // Simon On 06/10/15 08:01, Mark Cranness wrote: > Hi All, > > Re: Lucene index reset/cleared after an unexpected powerdown - advice please > > A client site had an unexpected powerdown (and UPS failure), after which the Lucene index was empty or corrupted and has > lost its documents. > Users continued to work and add new documents, and the index now only contains those new documents. > > The index files (after the crash) only add up to about 78KB (for 30 new documents), so it looks like there is nothing > left of the old index. > > Our logging shows the last writer.UpdateDocument 8 minutes before the crash. > Our code Commits the index writer after each document update. > So the index should have been synced to disk > > There is evidence against the possibility that a document update was in progress at the time of the crash, but was not > logged because the log was not flushed. > > A bit of a long-shot, but does anybody have any advice on how to debug the truncation/clearing of the Lucene index? > > > Details: > Lucene.Net 3.0.3.0 > > Index is a Lucene.Net.Store.FSDirectory > _directory = FSDirectory.Open(new DirectoryInfo(luceneDir), new SingleInstanceLockFactory()); > > There is only one single (static) instance of the IndexWriter > _writer = new IndexWriter(_directory, analyzer, IndexWriter.MaxFieldLength.UNLIMITED); > > .NET 4.5 > > Thanks, > Mark > >