]> git.proxmox.com Git - ceph.git/blob - ceph/doc/dev/osd_internals/pg.rst
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / doc / dev / osd_internals / pg.rst
1 ====
2 PG
3 ====
4
5 Concepts
6 --------
7
8 *Peering Interval*
9 See PG::start_peering_interval.
10 See PG::acting_up_affected
11 See PG::RecoveryState::Reset
12
13 A peering interval is a maximal set of contiguous map epochs in which the
14 up and acting sets did not change. PG::RecoveryMachine represents a
15 transition from one interval to another as passing through
16 RecoveryState::Reset. On PG::RecoveryState::AdvMap PG::acting_up_affected can
17 cause the pg to transition to Reset.
18
19
20 Peering Details and Gotchas
21 ---------------------------
22 For an overview of peering, see `Peering <../../peering>`_.
23
24 * PG::flushed defaults to false and is set to false in
25 PG::start_peering_interval. Upon transitioning to PG::RecoveryState::Started
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
28 active until this happens (See PG::RecoveryState::WaitFlushedPeering).
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.