[
https://jira.codehaus.org/browse/MINDEXER-63?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Milos Kleint updated MINDEXER-63:
---------------------------------
Description:
see issue http://netbeans.org/bugzilla/show_bug.cgi?id=219645
for some reason (unknown to me yet) the index files cannot be deleted. The
codebase then gets into bad state.
possibly wrong code in DefaultIndexingContext:
{code:java}
public synchronized void replace( Directory directory )
ÃÂ ÃÂ ÃÂ ÃÂ throws IOException
ÃÂ ÃÂ {
ÃÂ ÃÂ ÃÂ ÃÂ final Date ts = IndexUtils.getTimestamp( directory );
ÃÂ ÃÂ ÃÂ ÃÂ closeReaders();
ÃÂ ÃÂ ÃÂ ÃÂ deleteIndexFiles( false );
ÃÂ ÃÂ ÃÂ ÃÂ IndexUtils.copyDirectory( directory, indexDirectory );
ÃÂ ÃÂ ÃÂ ÃÂ openAndWarmup();
ÃÂ ÃÂ ÃÂ ÃÂ // reclaim the index as mine
ÃÂ ÃÂ ÃÂ ÃÂ storeDescriptor();
ÃÂ ÃÂ ÃÂ ÃÂ updateTimestamp( true, ts );
ÃÂ ÃÂ ÃÂ ÃÂ optimize();
ÃÂ ÃÂ }
{code}
when deleteIndexFiles(0 fails, openAndWarmup() is not called. also
closeReaders() ignores indexWriter..
was:
see issue http://netbeans.org/bugzilla/show_bug.cgi?id=219645
for some reason (unknown to me yet) the index files cannot be deleted. The
codebase then gets into bad state.
possibly wrong code in DefaultIndexingContext:
public synchronized void replace( Directory directory )
    throws IOException
  {
    final Date ts = IndexUtils.getTimestamp( directory );
    closeReaders();
    deleteIndexFiles( false );
    IndexUtils.copyDirectory( directory, indexDirectory );
    openAndWarmup();
    // reclaim the index as mine
    storeDescriptor();
    updateTimestamp( true, ts );
    optimize();
  }
when deleteIndexFiles(0 fails, openAndWarmup() is not called. also
closeReaders() ignores indexWriter..
> NullPointerException at
> org.apache.maven.index.context.DefaultIndexingContext.acquireIndexSearcher
> --------------------------------------------------------------------------------------------------
>
> Key: MINDEXER-63
> URL: https://jira.codehaus.org/browse/MINDEXER-63
> Project: Maven Indexer
> Issue Type: Bug
> Affects Versions: 5.0.0
> Environment: netbeans 7.3 dev builds.
> Reporter: Milos Kleint
> Priority: Critical
>
> see issue http://netbeans.org/bugzilla/show_bug.cgi?id=219645
> for some reason (unknown to me yet) the index files cannot be deleted. The
> codebase then gets into bad state.
> possibly wrong code in DefaultIndexingContext:
> {code:java}
> public synchronized void replace( Directory directory )
> ÃÂ ÃÂ ÃÂ ÃÂ throws IOException
> ÃÂ ÃÂ {
> ÃÂ ÃÂ ÃÂ ÃÂ final Date ts = IndexUtils.getTimestamp( directory );
> ÃÂ ÃÂ ÃÂ ÃÂ closeReaders();
> ÃÂ ÃÂ ÃÂ ÃÂ deleteIndexFiles( false );
> ÃÂ ÃÂ ÃÂ ÃÂ IndexUtils.copyDirectory( directory, indexDirectory );
> ÃÂ ÃÂ ÃÂ ÃÂ openAndWarmup();
> ÃÂ ÃÂ ÃÂ ÃÂ // reclaim the index as mine
> ÃÂ ÃÂ ÃÂ ÃÂ storeDescriptor();
> ÃÂ ÃÂ ÃÂ ÃÂ updateTimestamp( true, ts );
> ÃÂ ÃÂ ÃÂ ÃÂ optimize();
> ÃÂ ÃÂ }
> {code}
> when deleteIndexFiles(0 fails, openAndWarmup() is not called. also
> closeReaders() ignores indexWriter..
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira