Elffuss BraidHub

kikocis/java-driver public

Fix NPE in speculative executions when metrics disabled (JAVA-892).
Changeset21c6981ecc14b0914f264e1f05d54b76de1a9902636438bdbddab7a3efba77df
Authorolim7t <omichallat+github@gmail.com> · 2015-08-26 15:59 +02:00
Committerolim7t <omichallat+github@gmail.com> · 2015-08-28 15:15 +02:00
Parentsd6fac0e91dd4

Browse the files at this changeset

2 files changed

modified changelog/README.md +2 −0
@@ -44,6 +44,8 @@
4444 - [improvement] Use parallel calls when re-preparing statement on other
4545 hosts (JAVA-725)
4646 - [bug] Don't use connection timeout for unrelated internal queries (JAVA-629)
47+- [bug] Fix NPE in speculative executions when metrics disabled
48+ (JAVA-892)
4749
4850 Merged from 2.0.10_fixes branch:
4951
modified driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java +2 −1
@@ -134,7 +134,8 @@
134134 manager.executor().execute(new Runnable() {
135135 @Override
136136 public void run() {
137- metrics().getErrorMetrics().getSpeculativeExecutions().inc();
137+ if (metricsEnabled())
138+ metrics().getErrorMetrics().getSpeculativeExecutions().inc();
138139 startNewExecution();
139140 }
140141 });