]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd_type: encode new version for stretch CRUSH buckets
authorNitzan Mordechai <nmordech@redhat.com>
Tue, 13 Jun 2023 04:52:12 +0000 (04:52 +0000)
committerNitzan Mordechai <nmordech@redhat.com>
Tue, 6 Aug 2024 16:44:52 +0000 (16:44 +0000)
commita23c2ac9840f71e7b1ea6c8bdf4d039e3c0ebdea
tree0f0ef3bd1e9d9b19d0411da471b3df9e095046bb
parent094fc1836fd6ffe8ed96904d2e8dc388c3e46289
osd_type: encode new version for stretch CRUSH buckets

We are implementing a new version of the encoding scheme for stretch
CRUSH buckets in our OSD system.
However, we have encountered limitations when it comes to extending the
encoding version for non-stretch pools. Currently, we are restricted to
using version 29 due to backward compatibility concerns.

To address this, we have devised a solution that excludes version 30 while
maintaining backward compatibility. This means that we will specifically check
for version 30 and maintain the same behavior for older clients.

For new clients, we can proceed with encoding and decoding using version 31.
To accommodate stretch pools, we will utilize std::optional. The first byte of
the encoding will serve as a boolean indicator, determining if the optional data is present.
If the first byte is set to true, we will encode and decode four uint32_t members: peering_crush_*.

By implementing these changes, we can ensure compatibility with older clients while enabling the use
of the enhanced encoding scheme for new clients, specifically for stretch pools.

Fixes: https://tracker.ceph.com/issues/59291
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
src/osd/osd_types.cc
src/osd/osd_types.h