mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-08 16:03:20 +00:00
To properly handle abort_requested_exception thrown from migration_manager::get_schema_for_read in storage_proxy::handle_read (we do in the next commit) we have to somehow encode and return it. The encode_replica_exception_for_rpc function is not suitable for that because it requires the SourceTuple type (of a value returned by do_query()) which we don't know when calling get_schema_for_read. We move the part of encode_replica_exception_for_rpc responsible for handling exceptions to a new function and rewrite it in a way that doesn't require the SourceTuple type. As this function fits the name encode_replica_exception_for_rpc better, we name it this way and rename the previous encode_replica_exception_for_rpc.