Skip to content

Commit

Permalink
Instead of throwing exception when tokenRange finding fails, write to…
Browse files Browse the repository at this point in the history
… first available node
  • Loading branch information
Michael Burman committed Feb 24, 2017
1 parent c589d3f commit 31c1332
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -669,7 +669,8 @@ private Observable.Transformer<BoundStatement, Integer> applyMicroBatching() {
return tokenRange;
}
}
throw new RuntimeException("Unable to find any Cassandra node to insert token " + token.toString());
log.warn("Unable to find any Cassandra node to insert token " + token.toString());
return session.getCluster().getMetadata().getTokenRanges().iterator().next();
})
.flatMap(g -> g.compose(new BoundBatchStatementTransformer()))
.flatMap(batch -> rxSession
Expand Down

0 comments on commit 31c1332

Please sign in to comment.