mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 09:00:35 +00:00
This patch adds a new `LWT` flag to `cql3::prepared_metadata`. That allows clients to clearly distinguish betwen lwt and non-lwt statements without need to execute some custom parsing logic (e.g. parsing the prepared query with regular expressions), which is obviously quite fragile. The feature is meant to be further utilized by client drivers to use primary replicas consistently when dealing with conditional statements. Whether to use lwt optimization flag or not is handled by negotiation procedure between scylla server and client library via SUPPORTED/STARTUP messages (`LWT_ADD_METADATA_MARK` extension). Tests: unit(dev, debug), manual testing with modified scylla/gocql driver Signed-off-by: Pavel Solodovnikov <pa.solodovnikov@scylladb.com>