Skip to content

[FIP-28] Complete end-to-end historical partition writes #4119

Description

@luoyuxia

Search before asking

  • I searched in the issues and found nothing similar.

Description

Parent issue: #3631

Follow-up to #3633 and #4001. PR #4001 added the server-side primary-key write path for the shared historical partition, but intentionally deferred client-side routing, log-table writes, historical recovery and tiering, and cleanup of local historical KV overlays.

Complete the end-to-end write path for historical partitions in datalake-enabled tables. The implementation should cover:

  • Resolve potentially expired target partitions before a write batch is queued, route confirmed historical writes through the internal historical partition, and preserve the original physical partition selected for each batch.
  • Fail pending writes when refreshed metadata confirms that the original target partition no longer exists, while retaining the existing retry behavior for ordinary writes.
  • Carry original partition names through both PUT_KV and PRODUCE_LOG, with API-version gates and correct response correlation.
  • Tier historical KV and log records back to their original Paimon partitions, including recovery and lookup-after-write behavior.
  • Clean fully tiered historical KV overlays only after the lake and local log end offsets match. Guard queued cleanup with the leader epoch and scheduled log end offset, and support dynamic idle-time configuration updates.
  • Add unit and integration coverage for client routing, KV and log writes, Paimon tiering, recovery, missing targets, and overlay cleanup.

This issue is separate from #3633 because it tracks the client and lake integration required to make the server-side write path usable end to end, plus the lifecycle work explicitly deferred by #4001.

Willingness to contribute

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions