Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when client try to add docs to a replica node #402

Open
frotsch opened this issue Nov 11, 2021 · 0 comments
Open

NPE when client try to add docs to a replica node #402

frotsch opened this issue Nov 11, 2021 · 0 comments

Comments

@frotsch
Copy link

frotsch commented Nov 11, 2021

[WARN ] 2021-11-11 14:12:34.761 [LuceneIndexingExecutor-1-thread-3] LuceneServer - error while trying to addDocuments
java.lang.NullPointerException: null
	at com.yelp.nrtsearch.server.luceneserver.AddDocumentHandler$DocumentIndexer.addDocuments(AddDocumentHandler.java:317) ~[nrtsearch-0.10.2.jar:?]
	at com.yelp.nrtsearch.server.luceneserver.AddDocumentHandler$DocumentIndexer.runIndexingJob(AddDocumentHandler.java:238) ~[nrtsearch-0.10.2.jar:?]
	at com.yelp.nrtsearch.server.grpc.LuceneServer$LuceneServerImpl$1.onCompletedForIndex(LuceneServer.java:651) ~[nrtsearch-0.10.2.jar:?]
	at com.yelp.nrtsearch.server.grpc.LuceneServer$LuceneServerImpl$1.lambda$onCompleted$0(LuceneServer.java:696) ~[nrtsearch-0.10.2.jar:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]
	at java.lang.Thread.run(Thread.java:832) [?:?]

because shardState.writer is null on a replica node.

Instead of NPE the client should receive an error message like "Adding documents to an index on a replica mode is not supported".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant