db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6597) LUCENESUPPORT.LISTINDEXES() fails with FileNotFoundException
Date Mon, 09 Jun 2014 14:22:02 GMT

     [ https://issues.apache.org/jira/browse/DERBY-6597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Rick Hillegas updated DERBY-6597:

    Attachment: derby-6597-01-aa-writePropertiesOutsideIndexingLoop.diff

Attaching derby-6597-01-aa-writePropertiesOutsideIndexingLoop.diff. This patch fixes the problem.
The Lucene tests run cleanly with this patch.

This turns out to be the same issue described by DERBY-6603. The index properties were being
written for each indexed row in the table/view. If there were no rows, then the index properties
weren't written at all.

Touches the following file:

M       java/optional/org/apache/derby/optional/lucene/LuceneSupport.java

> LUCENESUPPORT.LISTINDEXES() fails with FileNotFoundException
> ------------------------------------------------------------
>                 Key: DERBY-6597
>                 URL: https://issues.apache.org/jira/browse/DERBY-6597
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL, Tools
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>         Attachments: derby-6597-01-aa-writePropertiesOutsideIndexingLoop.diff
> DROP TABLE seems to cascade and drop any Lucene indexes defined on the table. However,
there seems to be some traces of meta-data left, so that LUCENESUPPORT.LISTINDEXES thinks
the index is still there, and fails with FileNotFoundException when trying to access the index:
> {noformat}
> ij version 10.11
> ij> connect 'jdbc:derby:memory:db;create=true';
> ij> create table t(x int primary key, c clob);
> 0 rows inserted/updated/deleted
> ij> call syscs_util.syscs_register_tool('luceneSupport', true);
> 0 rows inserted/updated/deleted
> ij> call lucenesupport.createindex('app', 't', 'c', null);
> 0 rows inserted/updated/deleted
> ij> drop table t;
> 0 rows inserted/updated/deleted
> ij> select * from table ( lucenesupport.listindexes() ) li;
> SCHEMANAME                                                                          
                           |LASTUPDATED                  |LUCENEVERSION       |ANALYZER  
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> ERROR XJ001: Java exception: 'java.io.FileNotFoundException: /tmp/db/LUCENE/APP/T/C/derby-lucene.properties'.
> ERROR XJ001: Java exception: '/tmp/db/LUCENE/APP/T/C/derby-lucene.properties: java.io.FileNotFoundException'.
> {noformat}

This message was sent by Atlassian JIRA

View raw message