alternator: make "executor" a peering_sharded_service

Alternator uses a sharded<executor> for handling execution of Alternator
requests on different shards. In this patch we make executor a subclass of
peering_sharded_service, to allow one of these executors to run an exector
method on a different shard: Any one of the shard-local executor instances
can call container() to get the full sharded<executor>.

We will need this capability later, when we need to bounce requests between
shards because of requirements of the storage_proxy::cas (LWT) code.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This commit is contained in:
Nadav Har'El
2020-01-21 11:25:38 +02:00
parent e1b22b6a4c
commit 7dfd081e0d

View File

@@ -25,6 +25,7 @@
#include <seastar/http/httpd.hh>
#include "seastarx.hh"
#include <seastar/json/json_elements.hh>
#include <seastar/core/sharded.hh>
#include "service/storage_proxy.hh"
#include "service/migration_manager.hh"
@@ -34,7 +35,7 @@
namespace alternator {
class executor {
class executor : public peering_sharded_service<executor> {
service::storage_proxy& _proxy;
service::migration_manager& _mm;