[ https://issues.apache.org/jira/browse/KUDU-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17340579#comment-17340579 ]
ASF subversion and git services commented on KUDU-3273: ------------------------------------------------------- Commit dec30269cac84e0cbc589145a7685f24e0976592 in kudu's branch refs/heads/master from Li Zhiming [ https://gitbox.apache.org/repos/asf?p=kudu.git;h=dec3026 ] KUDU-3273: check result of TableLocationsCache.get() for null For TableLocationsCache, if get(key) is called immediately after cacheTabletLocations(key), it should not return null. But if partitions change and a call to cacheTabletLocations(otherKey) occurs between calls to cacheTableLocations(key) and get(key), the latter might return null. Change-Id: I13475701804ea4ae2bf8089a1e2b9143a12d2ab9 Reviewed-on: http://gerrit.cloudera.org:8080/17288 Tested-by: Alexey Serbin <aser...@cloudera.com> Reviewed-by: Alexey Serbin <aser...@cloudera.com> > NPE in AsyncKuduClient.discoverTablets() instead of NonCoveredRangeException > ---------------------------------------------------------------------------- > > Key: KUDU-3273 > URL: https://issues.apache.org/jira/browse/KUDU-3273 > Project: Kudu > Issue Type: Bug > Components: client, java > Affects Versions: 1.10.0, 1.10.1, 1.11.0, 1.12.0, 1.11.1, 1.13.0, 1.14.0 > Reporter: Alexey Serbin > Priority: Major > Labels: Java, client > > It's reported that in some scenarios {{AsyncKuduClient.discoverTablets()}} > throws NullPointerException instead of NonCoveredRangeException. As the > source code suggests, that might happen when {{TableLocationsCache.get()}} > returns {{null}}: > https://github.com/apache/kudu/blob/0e1a1545b827d9a3d5d50fd3d54f60bdea83f40c/java/kudu-client/src/main/java/org/apache/kudu/client/TableLocationsCache.java#L84 > The exact sequence of actions to reproduce the issue wasn't provided, but the > following trace was reported with {{kudu-client}} of 1.10.0 version, but I > guess the issue is present even in Kudu 1.14.0 (see > https://github.com/apache/kudu/blob/f396e485089f43c925ccbd41efe951b2ad5187b9/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java#L2428) > {noformat} > java.lang.NullPointerException > at > org.apache.kudu.client.AsyncKuduClient.discoverTablets(AsyncKuduClient.java:2335) > at > org.apache.kudu.client.AsyncKuduClient$MasterLookupCB.call(AsyncKuduClient.java:2192) > at > org.apache.kudu.client.AsyncKuduClient$MasterLookupCB.call(AsyncKuduClient.java:2173) > at com.stumbleupon.async.Deferred.doCall(Deferred.java:1280) > at com.stumbleupon.async.Deferred.addCallbacks(Deferred.java:685) > at com.stumbleupon.async.Deferred.addCallback(Deferred.java:721) > at > org.apache.kudu.client.AsyncKuduClient.locateTablet(AsyncKuduClient.java:1726) > at > org.apache.kudu.client.AsyncKuduClient.loopLocateTable(AsyncKuduClient.java:1851) > at > org.apache.kudu.client.AsyncKuduClient.locateTable(AsyncKuduClient.java:1894) > at > org.apache.kudu.client.AsyncKuduClient.syncLocateTable(AsyncKuduClient.java:1798) > at > org.apache.kudu.client.KuduTable.getTabletsLocations(KuduTable.java:233) > at > org.apache.kudu.client.KuduTable.getTabletsLocations(KuduTable.java:213) > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)