Skip to content

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

Open
cneira wants to merge 4 commits into
masterfrom
MANTA-5484
Open

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

Conversation

@cneira
Copy link
Copy Markdown
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
Copy Markdown

@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.

Comment thread buckets-mdapi/src/object/batch_update.rs
Comment thread schema-manager/src/main.rs Outdated
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>
Comment thread buckets-mdapi/src/object/batch_update.rs
Copy link
Copy Markdown

@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.

Comment thread buckets-mdapi/src/object/batch_update.rs
Comment thread buckets-mdapi/src/object/batch_update.rs
Comment thread buckets-mdapi/src/object/batch_update.rs Outdated
Comment thread buckets-mdapi/src/object/batch_update.rs
Copy link
Copy Markdown

@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.

Comment thread buckets-mdapi/tests/rpc_handlers.rs
Comment thread buckets-mdapi/tests/rpc_handlers.rs Outdated
Comment thread buckets-mdapi/tests/rpc_handlers.rs Outdated
Comment thread buckets-mdapi/tests/rpc_handlers.rs
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
Copy Markdown

@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 .

Comment thread buckets-mdapi/src/object/batch_update.rs
Comment thread buckets-mdapi/src/object/batch_update.rs
Comment thread buckets-mdapi/tests/rpc_handlers.rs
Comment thread buckets-mdapi/src/object/batch_update.rs Outdated
Comment thread buckets-mdapi/tests/rpc_handlers.rs Outdated
Comment thread buckets-mdapi/tests/rpc_handlers.rs Outdated
@cneira cneira requested review from danmcd and travispaul February 23, 2026 20:33
Copy link
Copy Markdown

@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.

Please address or dismiss my last comment? It's the only thing blocking +1 from me here.

@cneira
Copy link
Copy Markdown
Contributor Author

cneira commented Mar 9, 2026

Missing one unresolved in rpc_handlers.rs .

This has been fixed.

Copy link
Copy Markdown

@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.

Look forward to seeing your why-not-Rust-1.63 survey. Please file a ticket if it's possible to fix this, or at least report somewhere visible why not.

Comment thread buckets-mdapi/tests/rpc_handlers.rs
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