Skip to content

MANTA-5503 buckets-mdapi should have batch metadata updates#65

Open
cneira wants to merge 4 commits intomasterfrom
MANTA-5484
Open

MANTA-5503 buckets-mdapi should have batch metadata updates#65
cneira wants to merge 4 commits intomasterfrom
MANTA-5484

Conversation

@cneira
Copy link
Contributor

@cneira cneira commented Feb 18, 2026

Today, manta-rebalancer does not acknowledge manta-buckets-api objects, which means those are not rebalanced/evacuated to the appropriate storage nodes.
To evacuate an object, the following events must happen:

  1. The object's physical data must be copied/moved to a new storage node.
  2. The metadata of the object must be updated to reflect where the physical object really lives now (shark data)

[This is similar to what was done in ] (https://github.com/cneira/monitor-reef/blob/15383e082579a663ca16a4a4b79e1e46b30e3e21/libs/moray/src/objects.rs#L282)

This PR deals with (1). This new RPC endpoint helps to minimize network round-trips by updating objects via batches. Consumers of this new call will receive an object of type BatchUpdateObjectsResponse , which contains the failed payload of objects, to be able to be resubmitted again.

Current update object functionality in mdapi has added a sharks field as optional; this was intentional to not break current consumers of mdapi. If the shark metadata is not present on the request, then the object's shark metadata will not be touched.

The only consumer of this feature today will be manta-rebalancer.

@cneira cneira marked this pull request as draft February 18, 2026 02:19
@cneira cneira marked this pull request as ready for review February 19, 2026 01:42
@cneira cneira requested a review from a team February 19, 2026 01:42
@cneira cneira marked this pull request as draft February 19, 2026 13:51
@cneira cneira force-pushed the MANTA-5484 branch 2 times, most recently from 31f930e to e01c570 Compare February 19, 2026 23:27
@cneira cneira marked this pull request as ready for review February 19, 2026 23:30
Copy link

@danmcd danmcd left a comment

Choose a reason for hiding this comment

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

Quick pass 0. Missing MPL 2.0 headers everywhere and a copyright bump that shouldn't be in an otherwise unchanged file.

Pass 1 on Friday.

New Fast RPC endpoint that accepts multiple UpdateObjectPayload
items, groups them by vnode, and executes each vnode group
within a single PostgreSQL transaction. Objects in the same
vnode succeed or fail atomically.

=== AI-METADATA ===
AI-Role: code generation
Human-Role: code review, implementation guidance, design decisions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@danmcd danmcd left a comment

Choose a reason for hiding this comment

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

I'm worried the stated performance bounds in the comments are incorrect.

This is an incremental. Only rpc_handlers.rs remain for me to review.

Copy link

@danmcd danmcd left a comment

Choose a reason for hiding this comment

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

Pass 1 complete. Will return after blocking comments addressed.

// When tests run in parallel, each test must share the same
// RegisteredMetrics to avoid duplicate-registration panics.
// Uses static mut + Once because Mutex::new is not const fn
// in Rust 1.40 (the target toolchain on SmartOS).
Copy link

@danmcd danmcd Feb 20, 2026

Choose a reason for hiding this comment

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

Ahhh, I was looking at the import of Once above and wondering. This answers it mostly. One more question I'd like answered here: what Rust gives us Mutex::new ? A lookup suggests 1.63, please mention that here?

And a non-blocking followup for my own knowledge: What do we need to do to bump our Rust to 1.63 or more? Looks like pkgsrc LTS 24.4 has 1.81 in it, e.g.

Copy link

Choose a reason for hiding this comment

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

A reminder: you should mention that once we move to or past the 1.63 toolchain we should revisit this.

cneira and others added 3 commits February 20, 2026 18:56
Fix syntax error (missing dot and semicolon) on the 'which pg_tmp'
expect call and replace generic "failed to execute process" messages
with descriptive ones that name the command and suggest what to check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@danmcd danmcd left a comment

Choose a reason for hiding this comment

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

Missing one unresolved in rpc_handlers.rs .

@cneira cneira requested review from danmcd and travispaul February 23, 2026 20:33
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.

3 participants