If we're talking to just one replica, the digest is not going to be used, so better not to calculate it at all. The optimization helps with LOCAL_ONE queries where the result is large, but does not contain large blobs (many small rows). This patch adds a digest_algorithm parameter to the READ_DATA verb that can take on two values: none and MD5 (default), and sets it to none when we're reading from one replica. In the future we may add other values for more hardware-friendly digest algorithms. Message-Id: <1479380600-19206-1-git-send-email-avi@scylladb.com>
38 lines
1.3 KiB
C++
38 lines
1.3 KiB
C++
namespace query {
|
|
|
|
class qr_cell stub [[writable]] {
|
|
std::experimental::optional<api::timestamp_type> timestamp; // present when send_timestamp option set in partition_slice
|
|
std::experimental::optional<gc_clock::time_point> expiry; // present when send_expiry option set in partition_slice
|
|
|
|
// Specified by CQL binary protocol, according to cql_serialization_format in read_command.
|
|
bytes value;
|
|
|
|
std::experimental::optional<gc_clock::duration> ttl [[version 1.3]] = { }; // present when send_ttl option set in partition_slice
|
|
};
|
|
|
|
class qr_row stub [[writable]] {
|
|
std::vector<std::experimental::optional<qr_cell>> cells; // ordered as requested in partition_slice
|
|
};
|
|
|
|
class qr_clustered_row stub [[writable]] {
|
|
std::experimental::optional<clustering_key> key; // present when send_clustering_key option set in partition_slice
|
|
qr_row cells; // ordered as requested in partition_slice
|
|
};
|
|
|
|
class qr_partition stub [[writable]] {
|
|
std::experimental::optional<partition_key> key; // present when send_partition_key option set in partition_slice
|
|
qr_row static_row;
|
|
std::vector<qr_clustered_row> rows; // ordered by key
|
|
};
|
|
|
|
class query_result stub [[writable]] {
|
|
std::vector<qr_partition> partitions; // in ring order
|
|
};
|
|
|
|
enum class digest_algorithm : uint8_t {
|
|
none = 0, // digest not required
|
|
MD5 = 1, // default algorithm
|
|
};
|
|
|
|
}
|