You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by da...@apache.org on 2017/05/17 19:55:56 UTC
kudu git commit: [java-client] clear non-covered entries from meta
cache on table open (second try)
Repository: kudu
Updated Branches:
refs/heads/master 1d74c73e1 -> 0d7e2c630
[java-client] clear non-covered entries from meta cache on table open (second try)
This is a followup to d07ecd6ded01201c9. I missed a place in the open
table flow where we retry opening if the table has non-running tablets.
This was revealed when the test accompanying that commit was flaky about
20% of the time.
Change-Id: I8dbd16b2179b1d72b635a4dfaf54928d62125607
Reviewed-on: http://gerrit.cloudera.org:8080/6909
Reviewed-by: Todd Lipcon <to...@apache.org>
Tested-by: Kudu Jenkins
Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/0d7e2c63
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/0d7e2c63
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/0d7e2c63
Branch: refs/heads/master
Commit: 0d7e2c63052517cca6be3478c288565bda46e2b4
Parents: 1d74c73
Author: Dan Burkert <da...@apache.org>
Authored: Tue May 16 18:36:07 2017 -0700
Committer: Dan Burkert <da...@apache.org>
Committed: Wed May 17 19:55:30 2017 +0000
----------------------------------------------------------------------
.../src/main/java/org/apache/kudu/client/AsyncKuduClient.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kudu/blob/0d7e2c63/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java b/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
index b470990..440503d 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
@@ -507,6 +507,11 @@ public class AsyncKuduClient implements AutoCloseable {
String tableName = table.getName();
Deferred<KuduTable> d = rpc.getDeferred();
if (isCreateTableDoneResponsePB.getDone()) {
+ // When opening a table, clear the existing cached non-covered range entries.
+ TableLocationsCache cache = tableLocations.get(table.getTableId());
+ if (cache != null) {
+ cache.clearNonCoveredRangeEntries();
+ }
LOG.debug("Table {}'s tablets are now created", tableName);
rpc.callback(table);
} else {