Skip to content

Commit 4de1f52

Browse files
authored
Merge pull request ceph#58451 from zdover23/wip-doc-2024-07-07-dev-encoding
doc/dev: edit "Principles for format change" Reviewed-by: Anthony D'Atri <[email protected]>
2 parents 415f7ca + 570797e commit 4de1f52

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

doc/dev/encoding.rst

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,36 +30,35 @@ by a programmer by implementing the ``encode`` and ``decode`` methods.
3030

3131
Principles for format change
3232
----------------------------
33-
It is not unusual that the format of serialization changes. This
34-
process requires careful attention during both development
33+
It is not unusual for the format of serialization to change. This
34+
process requires careful attention both during development
3535
and review.
3636

37-
The general rule is that a decoder must understand what had been
38-
encoded by an encoder. Most of the problems come from ensuring
39-
that compatibility continues between old decoders and new encoders
40-
as well as new decoders and old decoders. One should assume
41-
that -- if not otherwise derogated -- any mix (old/new) is
42-
possible in a cluster. There are 2 main reasons for that:
43-
44-
1. Upgrades. Although there are recommendations related to the order
45-
of entity types (mons/osds/clients), it is not mandatory and
46-
no assumption should be made about it.
47-
2. Huge variability of client versions. It was always the case
48-
that kernel (and thus kernel clients) upgrades are decoupled
49-
from Ceph upgrades. Moreover, proliferation of containerization
50-
bring the variability even to e.g. ``librbd`` -- now user space
51-
libraries live on the container own.
52-
53-
With this being said, there are few rules limiting the degree
54-
of interoperability between dencoders:
37+
The general rule is that a decoder must understand what has been encoded by an
38+
encoder. Most difficulties arise during the process of ensuring the continuity
39+
of compatibility of old decoders with new encoders, and ensuring the continuity
40+
of compatibility of new decoders with old decoders. One should assume -- if not
41+
otherwise specified -- that any mix of old and new is possible in a cluster.
42+
There are two primary concerns:
43+
44+
1. **Upgrades.** Although there are recommendations related to the order of
45+
entity types (mons/OSDs/clients), it is not mandatory and no assumption
46+
should be made.
47+
2. **Huge variability of client versions.** It has always been the case that
48+
kernel upgrades (and thus kernel clients) are decoupled from Ceph upgrades.
49+
Containerization brings variability even to ``librbd`` -- now user space
50+
libraries live in the container itself:
51+
52+
There are a few rules limiting the degree of interoperability between
53+
dencoders:
5554

5655
* ``n-2`` for dencoding between daemons,
57-
* ``n-3`` hard requirement for client-involved scenarios,
58-
* ``n-3..`` soft requirements for client-involved scenarios. Ideally
59-
every client should be able to talk any version of daemons.
56+
* ``n-3`` hard requirement for client scenarios,
57+
* ``n-3..`` soft requirement for client scenarios. Ideally every client should
58+
be able to talk to any version of daemons.
6059

61-
As the underlying reasons are the same, the rules dencoders
62-
follow are virtually the same as for deprecations of our features
60+
As the underlying reasons are the same, the rules that dencoders
61+
follow are nearly the same as the rules for deprecations of our features
6362
bits. See the ``Notes on deprecation`` in ``src/include/ceph_features.h``.
6463

6564
Frameworks

0 commit comments

Comments
 (0)