Use signed in a bunch of places
This commit is contained in:
@@ -25,7 +25,7 @@ struct Precondition {
|
||||
};
|
||||
|
||||
Type type; ///< Type of precondition check
|
||||
uint64_t
|
||||
int64_t
|
||||
version; ///< Expected version number (0 uses read_version from request)
|
||||
std::string_view begin; ///< Begin key (or single key for PointRead)
|
||||
std::string_view end; ///< End key for RangeRead (unused for PointRead)
|
||||
@@ -66,7 +66,7 @@ private:
|
||||
ArenaAllocator arena_;
|
||||
std::optional<std::string_view> request_id_;
|
||||
std::string_view leader_id_;
|
||||
uint64_t read_version_ = 0;
|
||||
int64_t read_version_ = 0;
|
||||
std::vector<Precondition, ArenaStlAllocator<Precondition>> preconditions_;
|
||||
std::vector<Operation, ArenaStlAllocator<Operation>> operations_;
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
* @brief Get the read version.
|
||||
* @return Read version number
|
||||
*/
|
||||
uint64_t read_version() const { return read_version_; }
|
||||
int64_t read_version() const { return read_version_; }
|
||||
|
||||
/**
|
||||
* @brief Get the preconditions.
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
* @brief Set the read version for precondition validation.
|
||||
* @param read_version The snapshot version number
|
||||
*/
|
||||
void set_read_version(uint64_t read_version) { read_version_ = read_version; }
|
||||
void set_read_version(int64_t read_version) { read_version_ = read_version; }
|
||||
|
||||
/**
|
||||
* @brief Add a precondition to the commit request.
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
* @param arena_allocated_end End key for RangeRead (optional, empty for
|
||||
* PointRead)
|
||||
*/
|
||||
void add_precondition(Precondition::Type type, uint64_t version,
|
||||
void add_precondition(Precondition::Type type, int64_t version,
|
||||
std::string_view arena_allocated_begin,
|
||||
std::string_view arena_allocated_end = {}) {
|
||||
preconditions_.push_back(Precondition{type, version, arena_allocated_begin,
|
||||
|
||||
Reference in New Issue
Block a user