You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CQL4 has flaws that allows scenario when after schema change affected
prepare statement is not invalidated on client side.
As result, data that is read by driver does no match cached metadata and
client will fail to deserialize or deserialization will go wrong.
More info at: scylladb/scylladb#20860
This commit introduces PREPARE_SKIP_CQL4_METADATA_RESOLVE_METHOD(advanced.prepared-statements.skip-cql4-metadata-resolve-method)
that controls how driver resolves skip metadata flag for CQL4 prepared
statements, it can be "smart", "always-on", "always-off". Default is
"smart".
It makes driver disable skip metadata flag only for wildcard selects and
selects that returns udts (including collections and maps)
# When this occurs, the client's metadata can become outdated, leading to various deserialization errors.
2188
+
#
2189
+
# To mitigate this, the driver can disable the `skip metadata` flag, ensuring the server includes metadata with every bound statement RESULT query response.
2190
+
# This setting determines how the driver handles the `skip metadata` flag for CQL 4 prepared statements:
2191
+
# - **"SMART"** (default) – Disables the flag only for wildcard selects (`SELECT * FROM`) and queries
2192
+
# that return UDTs (including UDT collections and maps containing UDTs).
2193
+
# - **"ENABLED"** – Enables the `skip metadata` flag, preventing metadata from being sent.
2194
+
# - **"DISABLED"** – Disables the `skip metadata` flag, ensuring metadata is included in every RESULT frame.
2195
+
#
2196
+
# Sending metadata reduces performance on both the driver and server while increasing traffic.
2197
+
# If you need to use UDTs or wildcard selects, you must either accept the performance impact or ensure:
2198
+
# 1. No schema alterations are performed on tables or UDTs in use.
2199
+
# 2. After any schema change, all relevant prepared statements are re-prepared.
2200
+
#
2201
+
# Required: yes
2202
+
# Modifiable at runtime: yes, the new value will be used for requests issued after the change.
2203
+
# Overridable in a profile: yes
2204
+
skip-cql4-metadata-resolve-method = smart
2205
+
2185
2206
# How the driver replicates prepared statements on a node that just came back up or joined the
0 commit comments