]> git.proxmox.com Git - ceph.git/blame - ceph/doc/dev/osd_internals/pg.rst
import 15.2.0 Octopus source
[ceph.git] / ceph / doc / dev / osd_internals / pg.rst
CommitLineData
7c673cae
FG
1====
2PG
3====
4
5Concepts
6--------
7
8*Peering Interval*
9 See PG::start_peering_interval.
10 See PG::acting_up_affected
9f95a23c 11 See PG::PeeringState::Reset
7c673cae
FG
12
13 A peering interval is a maximal set of contiguous map epochs in which the
9f95a23c 14 up and acting sets did not change. PG::PeeringMachine represents a
7c673cae 15 transition from one interval to another as passing through
9f95a23c 16 PeeringState::Reset. On PG::PeeringState::AdvMap PG::acting_up_affected can
7c673cae
FG
17 cause the pg to transition to Reset.
18
19
20Peering Details and Gotchas
21---------------------------
22For an overview of peering, see `Peering <../../peering>`_.
23
24 * PG::flushed defaults to false and is set to false in
9f95a23c 25 PG::start_peering_interval. Upon transitioning to PG::PeeringState::Started
7c673cae
FG
26 we send a transaction through the pg op sequencer which, upon complete,
27 sends a FlushedEvt which sets flushed to true. The primary cannot go
9f95a23c 28 active until this happens (See PG::PeeringState::WaitFlushedPeering).
7c673cae
FG
29 Replicas can go active but cannot serve ops (writes or reads).
30 This is necessary because we cannot read our ondisk state until unstable
31 transactions from the previous interval have cleared.