mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
This patch adds a struct `per_request_options` used to communicate between CDC and upper abstraction layers. We need this for better compatibility with DynamoDB Streams in Alternator (https://github.com/scylladb/scylladb/issues/6918) to change operation types of log rows. This patch also adds a way to conditionally forward the item read by LWT to CDC and use it as a preimage. For now, only Alternator uses this feature. The main changes are: - add a struct `cdc::per_request_options` to pass information between CDC and upper abstraction layers, - add the struct to `cas_request::apply`'s signature, - add a possibility to provide a preimage fetched by an upper abstraction layer (to propagate a row read by Alternator to CDC's preimage). This reduces the number of reads-before-write by 1 for some **Alternator** requests and it is always safe. It's possible to use this feature also in CQL. No backport, it's a feature. Refs https://github.com/scylladb/scylladb/issues/6918 Refs https://github.com/scylladb/scylladb/pull/26121 Closes scylladb/scylladb#26149 * github.com:scylladb/scylladb: alternator, cdc: Re-use the row read by LWT as a CDC preimage cdc: Support prefetched preimages storage: Add cdc options to cas_request::apply cdc, storage: Add a struct to pass per-mutation options to CDC cdc: Move operations enum to the top of the namespace