mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-23 18:10:39 +00:00
The constructor of `read_command` is used both by IDL and clients in the code. However, this constructor has a parameter that is not used by IDL: `read_timestamp`. This requires that this parameter is the very last in the list and that new parameters that are used by IDL are added before it. One such new parameter was `bool is_first_page`. Adding this parameter right before the read timestamp one created a situation where the last parameter (read_timestamp) implicitly converts to the one before it (is_first_page). This means that some call sites passing `read_timestamp` were now silently converting this to `is_first_page`, effectively dropping the timestamp. This patch aims to rectify this, while also avoiding similar accidents in the future, by making `is_first_page` a `bool_class` which doesn't have any implicit convertions defined. This change does not break the ABI as `bool_class` is also sent as a `bool` on the wire. Signed-off-by: Botond Dénes <bdenes@scylladb.com> Tests: unit(dev) Message-Id: <20200422073657.87241-1-bdenes@scylladb.com>