apache / apache/lucene

NumberFormatException: For input string: "gen.before_restore_2011-03-21_07.15.36.372112" [LUCENE-3008]

Open
#4,082 1 comment 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major module:core/index type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Hello,

One of our users reported the following stacktrace:

Exception in thread "Thread-3" java.lang.NumberFormatException: For input string: "gen.before_restore_2011-03-21_07.15.36.372112"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:419)
at org.apache.lucene.index.SegmentInfos.generationFromSegmentsFileName(SegmentInfos.java:199)
at org.apache.lucene.index.SegmentInfos.getCurrentSegmentGeneration(SegmentInfos.java:134)
at org.apache.lucene.index.SegmentInfos.getCurrentSegmentGeneration(SegmentInfos.java:151)
at org.apache.lucene.index.IndexReader.indexExists(IndexReader.java:626)
at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1015)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:887)
at net.sourceforge.docfetcher.model.RootScope.updateIndex(RootScope.java:138)
at net.sourceforge.docfetcher.model.ScopeRegistry$2.run(ScopeRegistry.java:392)

I'm afraid I can't provide any more information than this, other than the Lucene version: 3.0.0

Best regards
Tran Nam Quang

---
Migrated from [LUCENE-3008](https://issues.apache.org/jira/browse/LUCENE-3008) by Nam-Quang Tran, updated Apr 20 2011

Contributor guide

Open the contributing guide

Research direction

Start with SegmentInfos.generationFromSegmentsFileName and getCurrentSegmentGeneration, which appear in the stack trace, then trace the call through IndexReader.indexExists and IndexWriter.init. The report provides no reproduction beyond the stack trace and Lucene 3.0.0, so first determine how this filename reaches the generation parser. Done means the cause is reproducible and the handling is covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.