This way they'll be holding the appropriate pipeline stage.
Signed-off-by: Samuel Just <sjust@redhat.com>
else
peering_state.set_role(-1);
- PeeringCtx rctx;
- PeeringState::Initialize evt;
- peering_state.handle_event(evt, &rctx);
- peering_state.write_if_dirty(rctx.transaction);
- store->do_transaction(
- coll_ref,
- std::move(rctx.transaction));
+ epoch_t epoch = peering_state.get_osdmap()->get_epoch();
+ shard_services.start_operation<LocalPeeringEvent>(
+ this,
+ shard_services,
+ pg_whoami,
+ pgid,
+ epoch,
+ epoch,
+ PeeringState::Initialize());
return seastar::now();
});
ObjectStore::Transaction &t,
PGPeeringEventRef on_commit) final {
t.register_on_commit(
- new LambdaContext([this, on_commit](){
- PeeringCtx rctx;
- do_peering_event(*on_commit, rctx);
- shard_services.dispatch_context(std::move(rctx));
- }));
+ new LambdaContext(
+ [this, on_commit=std::move(on_commit)] {
+ shard_services.start_operation<LocalPeeringEvent>(
+ this,
+ shard_services,
+ pg_whoami,
+ pgid,
+ std::move(*on_commit));
+ }));
}
void update_heartbeat_peers(set<int> peers) final {