Elffuss BraidHub

kikocis/java-driver public

Merge pull request #437 from datastax/java892

Fix NPE in speculative executions when metrics disabled (JAVA-892).
Changeset926f11f48fd713e8024e48711f3656682160fa7d4bc499707aa1dd6d9c1bdea4
AuthorOlivier Michallat <olim7t@users.noreply.github.com> · 2015-08-28 15:16 +02:00
CommitterOlivier Michallat <olim7t@users.noreply.github.com> · 2015-08-28 15:16 +02:00
Parentsd6fac0e91dd4, 21c6981ecc14

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 });