Skip to content

Skip non-localized entries in replication and lifecycle - #2827

Closed
francoisferrand wants to merge 2 commits into
improvement/BB-814from
francoisferrand-improvement/BB-816-skip-non-localized-en
Closed

Skip non-localized entries in replication and lifecycle#2827
francoisferrand wants to merge 2 commits into
improvement/BB-814from
francoisferrand-improvement/BB-816-skip-non-localized-en

Conversation

@francoisferrand

Copy link
Copy Markdown
Contributor

Stacked on #2826 (BB-814), which added the localization trigger. Base branch is francoisferrand-improvement/BB-814, review that one first.

In a clean room, an object's metadata is local but its data still lives on the source cluster: dataStoreName points at an isCRR location. Such a version has nothing local to offer, so the workflows that would otherwise pick it up must leave it alone until localization has rewritten the metadata with a real local location.

Replication: the populator already diverted those entries to localization, but only when localization was configured. Without it they fell through and got replicated, which would hand the target a location it cannot read. They are now skipped in both cases. Nothing is lost, since the localization merge produces a new oplog entry carrying the real location, and replication picks it up then.

Lifecycle transitions: same idea. Localization is the only valid transition out of an isCRR location and it has its own trigger (the queue populator), not lifecycle rules. A transition rule matching such a version is skipped, and the version is simply re-evaluated on a later scan.

Design doc: https://citadel.scality.net/design/replication/zenko-full-dr/#copy-trigger

Issue: BB-816

In a clean room, an object's metadata is local but its data still lives
on the source cluster: dataStoreName points at an isCRR location. Such a
version has nothing local to offer, so the existing workflows must leave
it alone until localization has rewritten the metadata.

The replication populator already diverted those entries to localization,
but only when localization was configured; otherwise they fell through
and got replicated, which would copy a location the target cannot read.
Skip them in both cases. Nothing is lost: the localization merge produces
a new oplog entry with the real location, and replication picks it up
then.

Lifecycle transitions get the same treatment. Localization is the only
valid transition out of an isCRR location and it has its own trigger, so
a transition rule matching such a version is simply skipped and the
version re-evaluated on a later scan.

Issue: BB-816
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.06%. Comparing base (7139bf2) to head (10de8e8).
⚠️ Report is 1 commits behind head on improvement/BB-814.

Files with missing lines Patch % Lines
extensions/lifecycle/tasks/LifecycleTask.js 0.00% 5 Missing ⚠️
...xtensions/replication/ReplicationQueuePopulator.js 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
...xtensions/replication/ReplicationQueuePopulator.js 59.79% <0.00%> (-5.84%) ⬇️
extensions/lifecycle/tasks/LifecycleTask.js 90.90% <0.00%> (-0.82%) ⬇️

... and 3 files with indirect coverage changes

Components Coverage Δ
Bucket Notification 80.27% <ø> (ø)
Core Library 81.30% <ø> (-0.60%) ⬇️
Ingestion 70.09% <ø> (ø)
Lifecycle 79.22% <0.00%> (-0.14%) ⬇️
Oplog Populator 85.83% <ø> (ø)
Replication 61.26% <0.00%> (-0.21%) ⬇️
Bucket Scanner 85.76% <ø> (ø)
@@                  Coverage Diff                   @@
##           improvement/BB-814    #2827      +/-   ##
======================================================
- Coverage               75.37%   75.06%   -0.32%     
======================================================
  Files                     200      200              
  Lines                   13999    14003       +4     
======================================================
- Hits                    10552    10511      -41     
- Misses                   3437     3482      +45     
  Partials                   10       10              
Flag Coverage Δ
api:retry 9.06% <0.00%> (-0.01%) ⬇️
api:routes 8.82% <0.00%> (-0.01%) ⬇️
bucket-scanner 85.76% <ø> (ø)
ft_test:queuepopulator 9.32% <0.00%> (-1.83%) ⬇️
ingestion 12.65% <0.00%> (-0.01%) ⬇️
lib 8.77% <0.00%> (-0.06%) ⬇️
notification 1.01% <0.00%> (-0.01%) ⬇️
oplogPopulator 0.13% <0.00%> (-0.01%) ⬇️
replication 18.74% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The rewording added in the previous commit did not carry any new
information, and only made the stacked diff harder to read: the
localization trigger comment from BB-814 already explains why the check
sits before any replication condition.

Issue: BB-816
@francoisferrand
francoisferrand deleted the francoisferrand-improvement/BB-816-skip-non-localized-en branch August 24, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant