std::unique_ptr<Connection> -> Ref<Connection>
This commit is contained in:
@@ -9,14 +9,13 @@
|
||||
* Contains connection with parsed CommitRequest.
|
||||
*/
|
||||
struct CommitEntry {
|
||||
std::unique_ptr<Connection> connection;
|
||||
Ref<Connection> connection;
|
||||
int64_t assigned_version = 0; // Set by sequence stage
|
||||
bool resolve_success = false; // Set by resolve stage
|
||||
bool persist_success = false; // Set by persist stage
|
||||
|
||||
CommitEntry() = default; // Default constructor for variant
|
||||
explicit CommitEntry(std::unique_ptr<Connection> conn)
|
||||
: connection(std::move(conn)) {}
|
||||
explicit CommitEntry(Ref<Connection> conn) : connection(std::move(conn)) {}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -24,12 +23,11 @@ struct CommitEntry {
|
||||
* then transfer to status threadpool.
|
||||
*/
|
||||
struct StatusEntry {
|
||||
std::unique_ptr<Connection> connection;
|
||||
Ref<Connection> connection;
|
||||
int64_t version_upper_bound = 0; // Set by sequence stage
|
||||
|
||||
StatusEntry() = default; // Default constructor for variant
|
||||
explicit StatusEntry(std::unique_ptr<Connection> conn)
|
||||
: connection(std::move(conn)) {}
|
||||
explicit StatusEntry(Ref<Connection> conn) : connection(std::move(conn)) {}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -38,10 +36,10 @@ struct StatusEntry {
|
||||
* Resolve stage can perform configurable CPU work for benchmarking.
|
||||
*/
|
||||
struct HealthCheckEntry {
|
||||
std::unique_ptr<Connection> connection;
|
||||
Ref<Connection> connection;
|
||||
|
||||
HealthCheckEntry() = default; // Default constructor for variant
|
||||
explicit HealthCheckEntry(std::unique_ptr<Connection> conn)
|
||||
explicit HealthCheckEntry(Ref<Connection> conn)
|
||||
: connection(std::move(conn)) {}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user