Skip to content

Commit e8b9ab7

Browse files
committed
crimson/os/seastore/collection_manager: allow empty-delta-buffer
collection nodes Fixes: https://tracker.ceph.com/issues/64728 Signed-off-by: Xuehan Xu <[email protected]>
1 parent 6c9d1b6 commit e8b9ab7

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/crimson/os/seastore/collection_manager/collection_flat_node.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,19 @@ struct CollectionNode
153153
}
154154

155155
ceph::bufferlist get_delta() final {
156-
assert(!delta_buffer.empty());
157156
ceph::bufferlist bl;
158-
encode(delta_buffer, bl);
159-
delta_buffer.clear();
157+
// FIXME: CollectionNodes are always first mutated and
158+
// then checked whether they have enough space,
159+
// and if not, new ones will be created and the
160+
// mutation_pending ones are left untouched.
161+
//
162+
// The above order should be reversed, nodes should
163+
// be mutated only if there are enough space for new
164+
// entries.
165+
if (!delta_buffer.empty()) {
166+
encode(delta_buffer, bl);
167+
delta_buffer.clear();
168+
}
160169
return bl;
161170
}
162171

0 commit comments

Comments
 (0)