Issue Details (XML | Word | Printable)

Key: KATTA-179
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Johannes Zillmann
Reporter: Johannes Zillmann
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Katta

undeployment of index can lead to NPE in BooleanQuery - improve exception message

Created: 01/Feb/11 10:09 PM   Updated: 01/Feb/11 10:35 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 0.6.4


 Description  « Hide
Querying a index while it is undeployed resulted in following exception:
11/02/01 19:51:16,911 ERROR client.NodeInteraction:166 - Error calling public abstract net.sf.katta.lib.lucene.DocumentFrequencyWritable net.sf.katta.lib.lucene.ILuceneServer.getDocFreqs(net.sf.katta.lib.lucene.QueryWritable,java.lang.String[]) throws java.io.IOException on eagle.local:20000 (try # 1 of 3) (id=0)
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at net.sf.katta.client.NodeInteraction.run(NodeInteraction.java:135)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
Caused by: org.apache.hadoop.ipc.RemoteException: java.io.IOException: java.lang.NullPointerException
	at org.apache.lucene.search.BooleanQuery.extractTerms(BooleanQuery.java:403)
	at net.sf.katta.lib.lucene.LuceneServer.getDocFreqs(LuceneServer.java:306)
	at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:508)
	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:959)
	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:955)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:396)
	at org.apache.hadoop.ipc.Server$Handler.run(Server.java:953)
	at org.apache.hadoop.ipc.Client.call(Client.java:740)
	at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:220)
	at $Proxy0.getDocFreqs(Unknown Source)
	... 8 more

I think we can't avoid a excpetion in this case - since we don't sychronize search with undeployment operations - but we could throw a better exception in this case.



 All   Comments   Change History   git Commits      Sort Order: Ascending order - Click to sort in descending order
Johannes Zillmann added a comment - 01/Feb/11 10:31 PM
Exception message should now be
 IllegalStateException("no index-server for shard '" + shardName + "' found - probably undeployed");

In general i changed the LuceneServer to fail fast and clear in case a shard has been removed and not return partial correct results or fial with an undefined exception.