src/crimson/pg_backend: truncate to 0 when EC pool in _writefull
This commit adds the missing EC branch in PGBackend::_writefull, which truncates the existing object to 0 (ie deletes it) before writing the new object. Before this change, it only implemented the replicated pools logic, ie to truncate the existing object to the length of the new object. This logic, for EC, meant writefull for smaller new objects is planned as an in-place read-modify-write. Now, parity needs to be recomputed and we need clones to save the old data for rollbacks. In seastore, this clone read hangs, leading to slow ops. For EC, we should not be doing this for a writefull where a new object needs to replace the old object. Fix: simply truncate the old object (delete) before writing the new object. Fixes: https://tracker.ceph.com/issues/79453 Signed-off-by: Shraddha Agrawal <shraddha.agrawal000@gmail.com>
S
Shraddha Agrawal committed
211b3a1fa97e1a43f6bfbc643c149b92283a8266
Parent: 7d9140d