Skip to content

copy location task reads the source data from a remote site - #2843

Merged
bert-e merged 1 commit into
development/9.6from
improvement/BB-812
Sep 11, 2026
Merged

bert-e merged 1 commit into
development/9.6from
improvement/BB-812

Conversation

@francoisferrand

Copy link
Copy Markdown
Contributor

A DR mirrors buckets from a production site it has no data path to: the
objects' metadata is replicated, but their data still lives on
production, in a CRR location Cloudserver has no data client for. So the
copy cannot go through the usual multiple-backend route, and reads the
data over S3 on the production site itself.

The location describes how to get there -- the servers to reach it, and
the STS to assume roles on -- and the object's location part says where
the data landed there and which role to assume to read it back, one role
per production account owning objects. Clients come from the replication
ClientManager, which already does this for replication: it refreshes the
assumed-role credentials, forgets the accounts that went quiet, and
supports an STS key read from a file.

A production site is Scality too, so both reads are the same GetObject
and only differ in where they point and whether a location constraint
means anything; they carry the same request uids, so a copy can be
followed across the two sites.

Failing to read the data is reported as an error rather than skipped, so
the lifecycle side gets to decide what it means for the transition and
the object is not left flagged in transition for good. A location that
is not reachable, or that holds more than the single part it is meant
to, fails the same way instead of quietly reading the wrong bytes.

Issue: BB-812
Co-authored-by: sylvain senechal senechalsylvain.dev@gmail.com

@francoisferrand
francoisferrand requested review from a team, delthas and maeldonn September 9, 2026 06:09
Comment thread extensions/replication/tasks/CopyLocationTask.js
Comment thread extensions/replication/tasks/CopyLocationTask.js
Comment thread extensions/replication/tasks/CopyLocationTask.js Outdated
Comment thread extensions/replication/tasks/CopyLocationTask.js Outdated
Comment thread extensions/replication/queueProcessor/QueueProcessor.js
@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.82%. Comparing base (f9f4df4) to head (322f768).
⚠️ Report is 1 commits behind head on development/9.6.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
...sions/replication/queueProcessor/QueueProcessor.js 75.75% <100.00%> (+0.34%) ⬆️
extensions/replication/tasks/CopyLocationTask.js 71.69% <100.00%> (+4.67%) ⬆️

... and 5 files with indirect coverage changes

Components Coverage Δ
Bucket Notification 80.25% <ø> (ø)
Core Library 83.13% <ø> (+0.10%) ⬆️
Ingestion 74.49% <ø> (ø)
Lifecycle 81.07% <ø> (ø)
Oplog Populator 85.80% <ø> (ø)
Replication 63.46% <100.00%> (+0.61%) ⬆️
Bucket Scanner 85.76% <ø> (ø)
@@                 Coverage Diff                 @@
##           development/9.6    #2843      +/-   ##
===================================================
+ Coverage            76.70%   76.82%   +0.12%     
===================================================
  Files                  205      205              
  Lines                14225    14269      +44     
===================================================
+ Hits                 10911    10962      +51     
+ Misses                3304     3297       -7     
  Partials                10       10              
Flag Coverage Δ
api:retry 9.29% <0.00%> (-0.03%) ⬇️
api:routes 9.06% <0.00%> (-0.03%) ⬇️
bucket-scanner 85.76% <ø> (ø)
ft_test:queuepopulator 11.62% <0.00%> (+0.26%) ⬆️
ingestion 12.88% <0.00%> (-0.05%) ⬇️
lib 9.06% <0.00%> (-0.03%) ⬇️
lifecycle 19.36% <0.00%> (-0.08%) ⬇️
notification 0.99% <0.00%> (-0.01%) ⬇️
oplogPopulator 0.13% <0.00%> (-0.01%) ⬇️
replication 19.03% <24.00%> (-0.02%) ⬇️
unit 57.70% <100.00%> (+0.33%) ⬆️

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.

Base automatically changed from improvement/BB-813 to development/9.6 September 11, 2026 14:31
@bert-e

bert-e commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Hello francoisferrand,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/bypass_source_branch_lineage Bypass the cross-branch contamination check
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

A DR mirrors buckets from a production site it has no data path to: the
objects' metadata is replicated, but their data still lives on
production, in a CRR location Cloudserver has no data client for. So the
copy cannot go through the usual multiple-backend route, and reads the
data over S3 on the production site itself.

The location describes how to get there -- the servers to reach it, and
the STS to assume roles on -- and the object's location part says where
the data landed there and which role to assume to read it back, one role
per production account owning objects. Clients come from the replication
ClientManager, which already does this for replication: it refreshes the
assumed-role credentials, forgets the accounts that went quiet, and
supports an STS key read from a file.

A production site is Scality too, so both reads are the same GetObject
and only differ in where they point and whether a location constraint
means anything; they carry the same request uids, so a copy can be
followed across the two sites.

Failing to read the data is reported as an error rather than skipped, so
the lifecycle side gets to decide what it means for the transition and
the object is not left flagged in transition for good. A location that
is not reachable, or that holds more than the single part it is meant
to, fails the same way instead of quietly reading the wrong bytes.

Issue: BB-812
Co-authored-by: sylvain senechal <senechalsylvain.dev@gmail.com>
@francoisferrand

Copy link
Copy Markdown
Contributor Author

/approve

@@ -307,6 +445,7 @@ class CopyLocationTask extends BackbeatTask {
method: 'CopyLocationTask._getAndPutObjectOnce',
peer: this.sourceConfig.s3,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

peer: this.sourceConfig.s3 identifies the local Cloudserver, but _sendGetObject can now route through a remote site's client. When the remote client.send() fails (network error, auth failure at the S3 level), these catch handlers log the local Cloudserver as the peer, pointing the operator at the wrong server. Same applies to the stream error handler above (lines 397, 407).

The new methods already log the correct endpoint when they detect an error, but transport-level errors from the remote send() would appear under the wrong peer.

@bert-e

bert-e commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/9.6

The following branches have NOT changed:

  • development/7.10
  • development/7.4
  • development/7.70
  • development/8.6
  • development/9.0
  • development/9.1
  • development/9.2
  • development/9.3
  • development/9.4
  • development/9.5

This pull request did not target the following hotfix branch(es) so they
were left untouched:

  • hotfix/9.0.7
  • hotfix/8.2.12
  • hotfix/7.4.8
  • hotfix/7.4.4
  • hotfix/7.10.12
  • hotfix/7.10.3
  • hotfix/7.9.0
  • hotfix/7.10.1
  • hotfix/7.10.8
  • hotfix/7.7.0
  • hotfix/7.70.12
  • hotfix/7.70.15
  • hotfix/9.0.4
  • hotfix/7.4.5
  • hotfix/7.4.6
  • hotfix/7.4.1
  • hotfix/7.10.0
  • hotfix/7.10.2
  • hotfix/7.4.2
  • hotfix/7.10.4
  • hotfix/7.4.0
  • hotfix/7.4.7
  • hotfix/7.70.1
  • hotfix/7.4.3
  • hotfix/7.4.10
  • hotfix/7.6.0
  • hotfix/7.8.0
  • hotfix/7.2.0
  • hotfix/7.4.9
  • hotfix/7.10.17

Please check the status of the associated issue BB-812.

Goodbye francoisferrand.

The following options are set: approve

@bert-e
bert-e merged commit 322f768 into development/9.6 Sep 11, 2026
23 of 24 checks passed
@bert-e
bert-e deleted the improvement/BB-812 branch September 11, 2026 15:17
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.

4 participants