Bump shard_rsm to use new method names
This commit is contained in:
parent
45861ae35a
commit
3961c4bb53
src
@ -79,6 +79,12 @@ using ReadResponses = std::variant<HlcResponse>;
|
||||
class Coordinator {
|
||||
ShardMap shard_map_;
|
||||
|
||||
ReadResponses Read(HlcRequest &&hlc_request) {
|
||||
HlcResponse res{};
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
WriteResponses Apply(AllocateHlcBatchRequest &&ahr) {
|
||||
AllocateHlcBatchResponse res{};
|
||||
|
||||
@ -111,7 +117,9 @@ class Coordinator {
|
||||
}
|
||||
|
||||
public:
|
||||
ReadResponses Read(ReadRequests requests) { return HlcResponse{}; }
|
||||
ReadResponses Read(ReadRequests requests) {
|
||||
return std::visit([&](auto &&requests) { return Read(requests); }, std::move(requests));
|
||||
}
|
||||
|
||||
WriteResponses Apply(WriteRequests requests) {
|
||||
return std::visit([&](auto &&requests) { return Apply(requests); }, std::move(requests));
|
||||
|
@ -41,7 +41,7 @@ using memgraph::io::simulator::SimulatorStats;
|
||||
using memgraph::io::simulator::SimulatorTransport;
|
||||
using memgraph::storage::PropertyValue;
|
||||
|
||||
namespace memgraph::tests::simulation {
|
||||
namespace memgraph::io::rsm {
|
||||
|
||||
using ShardRsmKey = std::vector<PropertyValue>;
|
||||
|
||||
@ -69,7 +69,7 @@ class StorageRsm {
|
||||
std::optional<ShardRsmKey> maximum_key_{std::nullopt};
|
||||
|
||||
public:
|
||||
StorageGetResponse read(StorageGetRequest request) {
|
||||
StorageGetResponse Read(StorageGetRequest request) {
|
||||
StorageGetResponse ret;
|
||||
if (state_.contains(request.key)) {
|
||||
ret.value = state_[request.key];
|
||||
@ -77,7 +77,7 @@ class StorageRsm {
|
||||
return ret;
|
||||
}
|
||||
|
||||
StorageWriteResponse apply(StorageWriteRequest request) {
|
||||
StorageWriteResponse Apply(StorageWriteRequest request) {
|
||||
StorageWriteResponse ret;
|
||||
|
||||
// Key exist
|
||||
@ -121,4 +121,4 @@ class StorageRsm {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace memgraph::tests::simulation
|
||||
} // namespace memgraph::io::rsm
|
||||
|
Loading…
Reference in New Issue
Block a user