Skip to content

Commit eb19c80

Browse files
committed
JAVA-1235: Move the query to the end of "re-preparing .." log message as a key value.
1 parent 1c3ad00 commit eb19c80

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

changelog/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

driver-core/src/main/java/com/datastax/driver/core/Cluster.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,8 +2128,8 @@ public void ensurePoolsSizing() {
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.

0 commit comments

Comments
 (0)