1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
6 #include <boost/intrusive_ptr.hpp>
7 #include <seastar/core/future.hh>
8 #include "include/buffer_fwd.h"
9 #include "osd/osd_types.h"
11 #include "acked_peers.h"
12 #include "pg_backend.h"
14 namespace crimson::osd
{
18 class ReplicatedBackend
: public PGBackend
21 ReplicatedBackend(pg_t pgid
, pg_shard_t whoami
,
23 crimson::osd::ShardServices
& shard_services
);
24 void got_rep_op_reply(const MOSDRepOpReply
& reply
) final
;
26 ll_read_errorator::future
<ceph::bufferlist
> _read(const hobject_t
& hoid
,
29 uint32_t flags
) override
;
30 seastar::future
<crimson::osd::acked_peers_t
>
31 _submit_transaction(std::set
<pg_shard_t
>&& pg_shards
,
32 const hobject_t
& hoid
,
33 ceph::os::Transaction
&& txn
,
35 epoch_t min_epoch
, epoch_t max_epoch
,
36 eversion_t ver
) final
;
38 const pg_shard_t whoami
;
39 crimson::osd::ShardServices
& shard_services
;
40 ceph_tid_t next_txn_id
= 0;
42 pending_on_t(size_t pending
)
43 : pending
{static_cast<unsigned>(pending
)}
46 crimson::osd::acked_peers_t acked_peers
;
47 seastar::promise
<> all_committed
;
49 using pending_transactions_t
= std::map
<ceph_tid_t
, pending_on_t
>;
50 pending_transactions_t pending_trans
;