fluss icon indicating copy to clipboard operation
fluss copied to clipboard

[Server] Add the server-side primary-key table bulk-load protocol

Open platinumhamburg opened this issue 2 months ago • 1 comments

Search before asking

  • [x] I searched in the issues and found nothing similar.

Description

Implement the server-side protocol described in FIP-61 for importing externally built KV snapshots into empty primary-key buckets. The Coordinator commits each bucket independently and restores the selected snapshot on the leader asynchronously.

A successful transaction commit confirms that the required buckets have committed. Visibility follows bucket recovery. The caller coordinates ordinary writes during import. If the leader WAL end offset differs from the allocated offset at bucket commit, the server rejects that bucket and the caller can start a new BulkLoad with a fresh allocation after resolving concurrent writes.

The server protocol is exposed through Coordinator RPCs. The client SDK is tracked in #4225. The implementation is tracked in #5269.

Scope

  • Add RPCs to begin a transaction, allocate and commit a bucket snapshot, query transaction progress, finish a transaction, and abort.
  • Support a non-partitioned primary-key table or a fixed set of physical partitions of one primary-key table. Merge-engine tables, auto-increment columns, and historical partitions are outside the initial scope.
  • Freeze the physical target and build context at Begin. Allocate the snapshot ID and WAL offset on demand for each bucket.
  • Prevent overlapping BulkLoad transactions from owning the same physical targets. The caller coordinates ordinary reads, writes, and DDL.
  • Validate the uploaded snapshot and atomically record its ordinary snapshot reference, recovery selection, and bucket commit result.
  • Restore each committed bucket asynchronously using the same recovery selection as ordinary snapshots. Resume recovery across Coordinator and TabletServer failures and leader changes.
  • Retain terminal results for retry and reclaim expired transaction metadata. Abort leaves already committed buckets intact.
  • Follow the upgrade and downgrade constraints defined by FIP-61.

Willingness to contribute

  • [x] I'm willing to submit a PR!

platinumhamburg avatar Sep 03 '26 09:09 platinumhamburg

Hi @polyzos Can you assign this to me ?

Anurag15v avatar Oct 04 '26 13:10 Anurag15v