Skip to content

Commit ce5d58d

Browse files
committed
osd: In optimized EC send empty transactions to non-primaries if object is recovering.
Signed-off-by: Alex Ainscow <[email protected]>
1 parent 1becd2c commit ce5d58d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/osd/ECCommon.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,14 +734,20 @@ void ECCommon::RMWPipeline::cache_ready(Op &op) {
734734
delete f;
735735
*_dout << dendl;
736736
}
737-
if (op.skip_transaction(pending_roll_forward, shard, transaction)) {
737+
bool should_send = get_parent()->should_send_op(pg_shard, op.hoid);
738+
/* should_send being false indicates that a recovery is going on to this
739+
* object this makes it critical that the log on the non-primary shards is
740+
* complete:- We may need to update "missing" with the latest version.
741+
* As such we must never skip a transaction completely. Note that if
742+
* should_send is false, then an empty transaction is sent.
743+
*/
744+
if (should_send && op.skip_transaction(pending_roll_forward, shard, transaction)) {
738745
// Must be an empty transaction
739746
ceph_assert(transaction.empty());
740747
dout(20) << __func__ << " Skipping transaction for shard " << shard << dendl;
741748
continue;
742749
}
743750
op.pending_commits++;
744-
bool should_send = get_parent()->should_send_op(pg_shard, op.hoid);
745751
const pg_stat_t &stats =
746752
(should_send || !backfill_shards.contains(pg_shard))
747753
? get_info().stats

0 commit comments

Comments
 (0)