Elffuss BraidHub

kikocis/java-driver public

JAVA-1235: Move the query to the end of "re-preparing .." log message as a key value.
Changeset16bea4c301caabe4601974d4b98fc6156818eb1db70159699f8bd2dbc8445436
AuthorVishy Kasar <vkasar@apple.com> · 2016-07-06 15:10 -07:00
CommitterVishy Kasar <vkasar@apple.com> · 2016-07-06 15:10 -07:00
Parents48c2cd675808

Browse the files at this changeset

2 files changed

modified changelog/README.md +1 −0
@@ -2,6 +2,7 @@
22
33 ### 3.0.3 (in progress)
44
5+- [improvement] JAVA-1235: Move the query to the end of "re-preparing .." log message as a key value.
56 - [improvement] JAVA-1147: Upgrade Netty to 4.0.37.
67 - [bug] JAVA-1213: Allow updates and inserts to BLOB column using read-only ByteBuffer.
78 - [bug] JAVA-1209: ProtocolOptions.getProtocolVersion() should return null instead of throwing NPE if Cluster has not
modified driver-core/src/main/java/com/datastax/driver/core/Cluster.java +2 −2
@@ -2128,8 +2128,8 @@
21282128 public PreparedStatement addPrepared(PreparedStatement stmt) {
21292129 PreparedStatement previous = preparedQueries.putIfAbsent(stmt.getPreparedId().id, stmt);
21302130 if (previous != null) {
2131- logger.warn("Re-preparing already prepared query {}. Please note that preparing the same query more than once is "
2132- + "generally an anti-pattern and will likely affect performance. Consider preparing the statement only once.", stmt.getQueryString());
2131+ logger.warn("Re-preparing already prepared query is generally an anti-pattern and will likely affect performance. "
2132+ + "Consider preparing the statement only once. Query='{}'", stmt.getQueryString());
21332133
21342134 // The one object in the cache will get GCed once it's not referenced by the client anymore since we use a weak reference.
21352135 // So we need to make sure that the instance we do return to the user is the one that is in the cache.