mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
Recently, Materialized Views were modified (see issue #4365) so that local view updates (when both base and view replicas are the same node) are synchronous. In particular, when the view's partition key is the same as the base table's, view writes are synchronous: A write now only returns after CL copies of the view data have been written. Alternator's LSI have exactly this case (same partition key as the base). This makes strongly-consistent (CL=LOCAL_QUORUM) reads in Alternator work correctly, so we update the documentation accordingly to no longer say that we don't support this DynamoDB feature. However unlike LSIs, for GSIs strongly-consistent reads are still not supported, and should not be supported (they are also not supported by DynamoDB). Such reads should generate an error. So this patch fixes this too. A GSI test which tested that strongly consistent reads are forbidden, which used to xfail, now passes so the patch removes the "xfail". Finally, we can simplify the LSI tests by using consistent reads instead of eventually-consistent reads with retries. Beyond simplifying the test, it's also an opportunity to *use* strongly-consistent reads and make sure that they work (while, as mentioned above, similar reads for GSIs are refused). Fixes #5007 Signed-off-by: Nadav Har'El <nyh@scylladb.com> Message-Id: <20200311170446.28611-1-nyh@scylladb.com>