0xCAB / zoie

Automatically exported from code.google.com/p/zoie
0 stars 0 forks source link

IndexReaderDecorator.redecorate NullPointerException issue #47

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. reopen ZoieSegmentReaders that getDecoratedReaders are not called first.

What is the expected output? What do you see instead?
Expected: No NullPointerException

What version of the product are you using? On what operating system?
BR_LUCENE_2.9_2 branch on debian linux

Please provide any additional information below.
copyFrom._decoratedReader is null before getDecoratedReaders is called.

and my patch attached.

Original issue reported on code.google.com by won...@gmail.com on 3 Nov 2009 at 1:59

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Lei:

    Would you mind give it a try on the BR_LUCENE_2.9_3 branch? This is the latest
branch.

Thanks

-John

Original comment by john.w...@gmail.com on 5 Nov 2009 at 10:05

GoogleCodeExporter commented 8 years ago
Yasu, would you mind  take a quick look?

Original comment by john.w...@gmail.com on 5 Nov 2009 at 10:07

GoogleCodeExporter commented 8 years ago
ok, i will try.

Original comment by won...@gmail.com on 5 Nov 2009 at 10:08

GoogleCodeExporter commented 8 years ago
I'm using zoie with BoboIndexReaderDecorator.

NullPointerExceptions will raise sometimes, if you feed data to consumer 
periodically.

copyFrom._decoratedReader passed to BoboIndexReaderDecorator.redecorate 
sometimes are
nulls.

I think we should check whether copyFrom._decoratedReader is null(maybe thread
synchronize is needed) and then decorate the newreader instead of calling
BoboIndexReaderDecorator.redecorate, or simply call getDecoratedReaders to get 
this
decoratedReader.

Original comment by won...@gmail.com on 5 Nov 2009 at 1:31

GoogleCodeExporter commented 8 years ago
Hi Lei:

     Please use this branch: BR_LUCENE_2.9_3

    We have changed such that index update reader decoration is no longer done lazily. It is always done when idx 
opens. So null case should no longer happen.

-John

Original comment by john.w...@gmail.com on 9 Nov 2009 at 12:13

GoogleCodeExporter commented 8 years ago

Original comment by john.w...@gmail.com on 9 Nov 2009 at 12:14

GoogleCodeExporter commented 8 years ago
No NullPointerExceptions now, thanks!

Original comment by won...@gmail.com on 9 Nov 2009 at 2:22