Project

General

Profile

Actions

Bug #81779

closed
KC KC

rgw: set_olh() passes log_data_change as update_olh()'s null_verid, tagging bilog deletes as null-version

Bug #81779: rgw: set_olh() passes log_data_change as update_olh()'s null_verid, tagging bilog deletes as null-version

Added by Krunal Chheda about 2 months ago. Updated about 1 month ago.

Status:
Backporting
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
tentacle, squid, umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v22.0.0-339-gfa3cb18bc5
Released In:
Upkeep Timestamp:
2026-11-03T09:39:47+00:00

Description

Problem

The fix for #55179 (commit 485020f97b08 "rgw/multisite: add a flag to bilog_flags and use it to set/unset null version", PR #58133) added bool null_verid = false ahead of bool log_op = true in RGWRados::update_olh(). The two calls in RGWRados::set_olh() were not updated and still pass log_data_change as the last positional argument:

update_olh(dpp, obj_ctx, state, bucket_info, olh_obj, y, zones_trace, log_data_change);

log_data_change therefore binds to null_verid, and log_op always takes its default true. Both are bool, so this compiles without a warning.

Affected: main (rgw_rados.cc:10271, 10292), tentacle (9566, 9587), squid since the #62309 backport (8731, 8752).

Effect

  • In multisite, log_data_change is true for versioned PUTs and delete-marker creation, and always true on the sync fetch path. So whenever set_olh() calls update_olh(), null_verid is true. apply_olh_log() then deletes each pending REMOVE_INSTANCE entry with null_verid=true, and the resulting CLS_RGW_OP_DEL bilog entries carry RGW_BILOG_NULL_VERSION. RGWBucketSyncSingleEntryCR on the peer rewrites such an entry's key to instance="null".
  • log_op is always true, so these removals are logged even when the caller passed log_data_change=false.

Seen on a two-zone vstart cluster: on a versioning-suspended bucket, a plain DELETE over an existing null version writes del a[""] with bilog_flags=3 (VERSIONED_OP | NULL_VERSION). With the arguments passed explicitly it writes bilog_flags=1. In this case the removed instance really is the null version, and the peer squashes the del behind the preceding link_olh_del, so the zones don't diverge.

From code inspection, not reproduced: if set_olh() applies a leftover REMOVE_INSTANCE for a non-null version (for example after a racing version delete), and that del reaches the peer without being squashed, the peer removes its null version instead.

Fix

Pass both arguments explicitly in set_olh():

update_olh(dpp, obj_ctx, state, bucket_info, olh_obj, y, zones_trace, false /* null_verid */, log_data_change);

Related issues 3 (3 open — 0 closed)

Copied to rgw - Backport #82600: tentacle: rgw: set_olh() passes log_data_change as update_olh()'s null_verid, tagging bilog deletes as null-versionNewKrunal Chheda

Actions
Copied to rgw - Backport #82601: squid: rgw: set_olh() passes log_data_change as update_olh()'s null_verid, tagging bilog deletes as null-versionNewKrunal Chheda

Actions
Copied to rgw - Backport #82602: umbrella: rgw: set_olh() passes log_data_change as update_olh()'s null_verid, tagging bilog deletes as null-versionNewKrunal Chheda

Actions

KC Updated by Krunal Chheda about 2 months ago Actions #1

  • Backport set to tentacle, squid

KC Updated by Krunal Chheda about 2 months ago Actions #2

  • Pull request ID set to 72708

KC Updated by Krunal Chheda about 2 months ago Actions #3

  • Status changed from New to Fix Under Review
  • Assignee set to Krunal Chheda
  • Backport changed from tentacle, squid to tentacle, squid, umbrella

UB Updated by Upkeep Bot about 1 month ago Actions #4

  • Copied to Backport #82600: tentacle: rgw: set_olh() passes log_data_change as update_olh()'s null_verid, tagging bilog deletes as null-version added

UB Updated by Upkeep Bot about 1 month ago Actions #5

  • Copied to Backport #82601: squid: rgw: set_olh() passes log_data_change as update_olh()'s null_verid, tagging bilog deletes as null-version added

UB Updated by Upkeep Bot about 1 month ago Actions #6

  • Copied to Backport #82602: umbrella: rgw: set_olh() passes log_data_change as update_olh()'s null_verid, tagging bilog deletes as null-version added

UB Updated by Upkeep Bot about 1 month ago Actions #7

  • Status changed from Fix Under Review to Backporting
  • Merge Commit set to fa3cb18bc567df15819b0d0dea2111bd0d8f39de
  • Fixed In set to v22.0.0-339-gfa3cb18bc5
  • Upkeep Timestamp set to 2026-11-03T09:39:47+00:00
Actions

Also available in: PDF Atom