Skip to content

Commit 8393603

Browse files
committed
osd: Relax missing entry assert for partial writes.
This assert was relaxed to allow for missing partial write logs. However it needs to be relaxed further to cope with the missing list not containing some objects with later log entries. Fixes tracker https://tracker.ceph.com/issues/73248 Signed-off-by: Alex Ainscow <[email protected]>
1 parent 857a462 commit 8393603

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/osd/PGLog.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,9 +1184,11 @@ struct PGLog : DoutPrefixProvider {
11841184
if (objiter->second->is_update() ||
11851185
(missing.may_include_deletes && objiter->second->is_delete())) {
11861186
if (ec_optimizations_enabled) {
1187-
// relax the assert for partial writes - missing may be newer than the
1188-
// most recent log entry
1189-
ceph_assert(missing.is_missing(hoid) &&
1187+
// relax the assert for partial writes. The log may not contain any
1188+
// updates for this object, in which case the object will not be in
1189+
// the missing list. If it is in the missing list, then the need version
1190+
// had better be higher or equal to the log version
1191+
ceph_assert(!missing.is_missing(hoid) ||
11901192
missing.get_items().at(hoid).need >= objiter->second->version);
11911193
} else {
11921194
ceph_assert(missing.is_missing(hoid) &&

0 commit comments

Comments
 (0)