Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CRR/ReplicationStatusUpdater.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const crypto = require('crypto');
const {
doWhilst, eachSeries, eachLimit, waterfall,
} = require('async');
Expand Down Expand Up @@ -72,6 +73,12 @@ class ReplicationStatusUpdater {
this.forceUsingConfiguration = forceUsingConfiguration;
this.log = log;

// Random repGroupId for microVersionIds: this tool bypasses
// CloudServer's configured replication group id, so a
// per-instance random token prevents collisions with
// concurrent writers.
this.replicationGroupId = crypto.randomBytes(4).toString('hex').slice(0, 7);

this._setupClients();

this.logProgressInterval = setInterval(this._logProgress.bind(this), LOG_PROGRESS_INTERVAL_MS);
Expand Down Expand Up @@ -242,7 +249,7 @@ class ReplicationStatusUpdater {

objMD.setReplicationSiteStatus(storageClass, 'PENDING');
objMD.setReplicationStatus('PENDING');
objMD.updateMicroVersionId();
objMD.updateMicroVersionId(this.replicationGroupId);
const md = objMD.getSerialized();
return this.cloudserverclient.putMetadata({
Bucket: bucket,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@senx/warp10": "^2.0.3",
"@smithy/util-retry": "^4.0.7",
"JSONStream": "^1.3.5",
"arsenal": "git+https://github.com/scality/arsenal#8.2.36",
"arsenal": "git+https://github.com/scality/arsenal#improvement/ARSN-578/micro-version-id",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arsenal is pinned to a feature branch (improvement/ARSN-578/micro-version-id) instead of a release tag. Git-based deps must pin to a tag to ensure reproducible builds and avoid picking up unfinished or breaking changes from a moving branch head.

```suggestion
"arsenal": "git+https://github.com/scality/arsenal#",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

`arsenal` is pinned to a feature branch (improvement/ARSN-578/micro-version-id) instead of a release tag. Per project conventions, git-based deps must pin to a tag (like the previous #8.2.36). Branch references are unstable — the resolved commit can change on every install, and the branch may be rebased or deleted. This should be updated to a tagged release of arsenal once the ARSN-578 changes are published.

— Claude Code

"async": "^3.2.6",
"bucketclient": "scality/bucketclient#8.2.6",
"express": "^5.1.0",
Expand Down
Loading
Loading