]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: Refactor partial_write to address multiple issues.
authorAlex Ainscow <aainscow@uk.ibm.com>
Tue, 29 Apr 2025 11:02:07 +0000 (12:02 +0100)
committerLaura Flores <lflores@ibm.com>
Wed, 9 Jul 2025 15:47:24 +0000 (15:47 +0000)
commitf51f60f3b27e4339972645cdeb34369a164e6ae2
tree7148ea2ee4ad7986175ddea08c8846488f660d40
parente5c27bd2acb551bc789d52f998879b2fbb2bbdfb
osd: Refactor partial_write to address multiple issues.

We fix a number of issues with partial_write here.

Fix an issue where it is unclear whether the empty PWLC state is
newer or older than a populated PWLC on another shard by always
updating the pwlc with an empty range, rather than blank.

This is an unfortunate small increase in metadata, so we should
come back to this in a later commit (or possibly later PR).

Normally a PG log consists of a set of log entries with each
log entry have a version number one greater than the previous
entry. When a PG splits the PG log is split so that each of the
new PGs only has log entries for objects in that PG, which
means there can be gaps between version numbers.

PGBackend::partial_write is trying to keep track of adjacent
log updates than do not update a particular shard storing
these as a range in partial_writes_last_complete. To do this
it must compare with the version number of the previous log
entry rather than testing for a version number increment of one.

Also simplify partial_writes to make it more readable.

Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
(cherry picked from commit 2467406f3e22c0746ce20cd04b838dccedadf055)
src/crimson/osd/pg.h
src/osd/PG.h
src/osd/PGBackend.cc
src/osd/PGBackend.h
src/osd/PGLog.h
src/test/osd/TestPGLog.cc