Skip to content

Unable to start index from backup if the state was not restored before #292

@sarthakn7

Description

@sarthakn7

This results in an error like this:

Apr 06, 2021 3:33:40 PM com.yelp.nrtsearch.server.grpc.LuceneServer$LuceneServerImpl startIndex
WARNING: error while trying to start index test_idx
java.lang.IllegalArgumentException: index test_idx was not saved or commited
	at com.yelp.nrtsearch.server.luceneserver.GlobalState.getIndex(GlobalState.java:240)
	at com.yelp.nrtsearch.server.grpc.LuceneServer$LuceneServerImpl.startIndex(LuceneServer.java:512)
	at com.yelp.nrtsearch.server.grpc.LuceneServerGrpc$MethodHandlers.invoke(LuceneServerGrpc.java:2781)
	at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:172)
	at io.grpc.PartialForwardingServerCallListener.onHalfClose(PartialForwardingServerCallListener.java:35)
	at io.grpc.ForwardingServerCallListener.onHalfClose(ForwardingServerCallListener.java:23)
	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:331)
	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:820)
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)

The current workaround is to add the index in the state and restart nrtsearch so that the index name is present in the loaded state:

$ echo '{"test_idx":"test_idx"}' > primary_state/indices.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions