]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ECTransaction: Remove incorrect asserts in generate_transactions 56924/head
authorMark Nelson <mark.nelson@clyso.com>
Tue, 16 Apr 2024 13:58:09 +0000 (13:58 +0000)
committerMark Nelson <mark.nelson@clyso.com>
Tue, 16 Apr 2024 13:58:09 +0000 (13:58 +0000)
Back in PR #11701 when EC Overwrites were added, there was significant churn in the ECTransaction code.  Several asserts were added in generate_transactions, but the code changed several times and it appears some of those asserts don't make sense in the final version of the PR.

This PR removes two of those asserts.  The first doesn't appear to be necessary given how the surrounding conditional block changed.   The second appears to be an incorrect assert that was left over from an earlier commit that no longer should be in place given the logic that was added to handle truncate (which roughly mirrors what we do in ReplicatedBackend).

It's possible the assert for obc and entry are also unnecessary, however I left those in place for now.

Fixes: https://tracker.ceph.com/issues/65509
Signed-off-by: Mark Nelson <mark.nelson@clyso.com>
src/osd/ECTransaction.cc

index 8761189a5a80a8f600fe0c8113ae518a3847601b..59eed567e810ecf73f909aa242797360d41bee39 100644 (file)
@@ -193,9 +193,6 @@ void ECTransaction::generate_transactions(
       xattr_rollback[ECUtil::get_hinfo_key()] = old_hinfo;
 
       if (op.is_none() && op.truncate && op.truncate->first == 0) {
-       ceph_assert(op.truncate->first == 0);
-       ceph_assert(op.truncate->first ==
-              op.truncate->second);
        ceph_assert(entry);
        ceph_assert(obc);