Skip to content

Commit 73ef7db

Browse files
Merge pull request ceph#65770 from aainscow/tracker_73248
osd: Relax missing entry assert for partial writes.
2 parents 1dbba9d + 8393603 commit 73ef7db

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
@@ -1185,9 +1185,11 @@ struct PGLog : DoutPrefixProvider {
11851185
if (objiter->second->is_update() ||
11861186
(missing.may_include_deletes && objiter->second->is_delete())) {
11871187
if (ec_optimizations_enabled) {
1188-
// relax the assert for partial writes - missing may be newer than the
1189-
// most recent log entry
1190-
ceph_assert(missing.is_missing(hoid) &&
1188+
// relax the assert for partial writes. The log may not contain any
1189+
// updates for this object, in which case the object will not be in
1190+
// the missing list. If it is in the missing list, then the need version
1191+
// had better be higher or equal to the log version
1192+
ceph_assert(!missing.is_missing(hoid) ||
11911193
missing.get_items().at(hoid).need >= objiter->second->version);
11921194
} else {
11931195
ceph_assert(missing.is_missing(hoid) &&

0 commit comments

Comments
 (0)