Skip to content

Conversation

SylvainSenechal
Copy link
Contributor

@SylvainSenechal SylvainSenechal commented Jul 22, 2025

@bert-e
Copy link
Contributor

bert-e commented Jul 22, 2025

Hello sylvainsenechal,

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
/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 TBA
/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
Copy link
Contributor

bert-e commented Jul 22, 2025

Incorrect fix version

The Fix Version/s in issue ARSN-513 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 8.2.28

Please check the Fix Version/s of ARSN-513, or the target
branch of this pull request.

const putFilter = { _id: key };
if (params?.preventConcurrentCompletion) {
putFilter['value.completeInProgress'] = { $ne: true };
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This approach does not work for Metadata (since metadata does not go through MongoClientInterface), and introduce some business-specific logic deep down in the "metadata layer" (completeInProgress is not related to metadata management, but really only to MPU objects) : thus creating more coupling and breaking the abstraction...
This may also relate to a larger issue that we have : we are currently not able (in the metadata interface/api) to distinguish between updates to an existing objet [like what is done in this specific case, we just want to try and set the completeInProgress flag] and an insertion. Here both are mostly undistinguishable, and thus we always upsert.
→ I wonder if having the distrinction would allow to handle this differently, i.e. on update we must not upsert and keep/increase the value of some other field.... (it would be a much larger endeavor, but useful debt cleanup needed in the long run anyway)

Alternatively, if we don't think this approach solves the issue or if we need that fix more urgently, this needs more work:

  • We may use putObjectWithCond function instead to set the completeInProgress flag. It allows performing such conditional operations, while keeping the condition in upper layer (cloudserver). It works only on non-versioned buckets -which is fine for shadow bucket-, and should be supported by metadata as well ; not sure however if we actually use it (i.e. is it stable enough, and/or if the upsert behavior is appropriate), so some testing may be needed.
  • If that does not work and we need to introduce an extra flag in putObject, we will need to design the new flag so that it has a generic semantic which allows to fix the issue, but makes sense generically and can be implemented in metadata and other cases of putObject (versionnned...)

Copy link
Contributor

Choose a reason for hiding this comment

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

there is also a (kind of generic) replayId flag, which is set on cloudserver side based on the uploadId, and implemented in Metadata but not in MongoClientInterface : may be worth reviewing this, to understand where it is set (in mpu shadow bucket, or in the actual bucket) and if it would solve our problem.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, Metadata uses the replayId to deduplicate the incoming requests, it's used in this specific scenario to avoid duplicating versions and ending up with duplicate sproxyd keys in particular. It's also used for complete/abort conflicts, where we consider that the abort always wins (and the user has to re-create a new MPU in such case for the next PUT of the same object).

Copy link
Contributor

Choose a reason for hiding this comment

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

and Cloudserver passes the upload ID of the MPU as the unique property of the MPU

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @jonathan-gramain ! Can you explain what is the expected semantics of the "backend", i.e. metadata/mongoClientInterface, regarding this field? And point us to the implementation in metadata?

cc @williamlardier maybe this also relates to the other issues we found/fixed on MPU ?

Copy link
Contributor

Choose a reason for hiding this comment

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

@francoisferrand I don't think it is related to my recent PRs in the sense that we really had a wrong logic in some cases, but for this one (the current PR), it is definitely related yes. I saw we had logic in the metadata backend that we don't with MongoDB.

As we definitely reproduced the issue with a mongodb backend, that is, end up with two distinct versions and the same data location, I was just wondering if @jonathan-gramain knows if the metadata backend would be also affected. As you mention to avoid duplicating versions and ending up with duplicate sproxyd keys in particular I would say this is handled.

If that is the case, it means two things:

  • We need to fix it for mongodb backend as well
  • We should list all these specific logic we have in metadata but not MongoDB, like this one, that allows to better support edge cases? I feel like this added logic in metadata is hiding the API behavior in the other backends case...

* with updating the operation log.
* @param {boolean} params.preventConcurrentCompletion - If true, the object is only created if
* completeInProgress is not already set to true. Fix this concurrent completeMultipartUpload issue :
* https://scality.atlassian.net/jira/software/c/projects/OS/boards/268?selectedIssue=CLDSRV-687
Copy link
Contributor

Choose a reason for hiding this comment

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

just ticket number of enough

Suggested change
* https://scality.atlassian.net/jira/software/c/projects/OS/boards/268?selectedIssue=CLDSRV-687
* CLDSRV-687

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.

5 participants