db::commitlog::replay_position: added std::hash<replay_position>
It's needed for hinted handoff. Signed-off-by: Vlad Zolotarov <vladz@scylladb.com>
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include "utils/UUID.hh"
|
||||
#include "utils/hash.hh"
|
||||
|
||||
|
||||
namespace db {
|
||||
@@ -134,3 +135,12 @@ private:
|
||||
std::ostream& operator<<(std::ostream& out, const replay_position& s);
|
||||
|
||||
}
|
||||
|
||||
namespace std {
|
||||
template <>
|
||||
struct hash<db::replay_position> {
|
||||
size_t operator()(const db::replay_position& v) const {
|
||||
return utils::tuple_hash()(v.id, v.pos);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user