You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "platinumhamburg (via GitHub)" <gi...@apache.org> on 2026/09/03 09:14:14 UTC
[I] [Umbrella] Support production-ready bulk loading for primary-key tables [fluss]
platinumhamburg opened a new issue, #4222:
URL: https://github.com/apache/fluss/issues/4222
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar.
### Motivation
## Motivation
Fluss currently lacks an efficient way to load a large initial dataset or
backfill a primary-key table. Writing records through the ordinary online
write path is expensive for bounded batch workloads.
This capability is also a foundation for promoting lake-resident data into
Fluss's real-time serving path. Typical use cases include upgrading a lake
table into a real-time table and promoting a cold lake partition into a
real-time partition, without replaying the complete dataset through the
ordinary online write path.
The target capability should build ordinary KV snapshots outside TabletServers,
install them through a server-managed transaction, and make the complete target
visible atomically.
Production use also requires scoped temporary write authorization. A workflow
that succeeds only when clients have unrestricted storage credentials is not
sufficient for production batch insert or lake-to-real-time promotion.
### Solution
## Scope
The initial implementation supports:
- Empty primary-key tables and partitions.
- Offline construction of ordinary Fluss KV snapshots.
- Server-managed Begin, Commit, and Abort transactions.
- Target fencing while a bulk load is in progress.
- Atomic publication after every bucket and replica is ready.
- Coordinator failover and assignment changes during transaction processing.
- A public client SDK for building and committing bulk-load files.
- Scoped temporary write authorization for build sessions.
- Flink batch insert as the first engine integration.
## Sub Tasks
- [ ] #TBD Support importing completed KV snapshots
- [ ] #TBD Add the server-side primary-key table bulk-load protocol
- [ ] #TBD Add the primary-key table bulk-load client SDK
- [ ] #TBD Add temporary write authorization for bulk-load sessions
- [ ] #TBD Support Flink batch insert into primary-key tables
The tasks are expected to be delivered in the listed order.
### Anything else?
## Completion criteria
This umbrella issue is complete when:
- An externally built KV snapshot can be validated, adopted, and restored by Fluss.
- The server provides a complete and recoverable Begin/Commit/Abort lifecycle.
- The client SDK exposes the complete bulk-load workflow.
- Build sessions can obtain scoped temporary write authorization without
serializing credentials into build contexts or engine checkpoints.
- Flink batch insert can load an empty primary-key table or partition and expose
the result atomically.
- Failure, abort, Coordinator failover, TabletServer restart, and assignment
change paths have appropriate regression coverage.
- Compatibility behavior and user documentation are complete.
## Non-goals
- Streaming bulk load.
- Loading into a non-empty target.
- Non-primary-key tables.
- Atomic commit across multiple independent targets.
- Spark integration.
- A complete general-purpose authentication or authorization system.
### Willingness to contribute
- [x] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Umbrella] Support production-ready bulk loading for primary-key tables [fluss]
Posted by "xx789633 (via GitHub)" <gi...@apache.org>.
xx789633 commented on issue #4222:
URL: https://github.com/apache/fluss/issues/4222#issuecomment-5773203250
@platinumhamburg great proposal! this is a very valuable feature, and there is strong demand for it in many production scenarios.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Umbrella] Support bulk loading for primary-key tables [fluss]
Posted by "polyzos (via GitHub) via issues" <is...@fluss.apache.org>.
polyzos commented on issue #4222:
URL: https://github.com/apache/fluss/issues/4222#issuecomment-6878883929
+1 from us. This would solve a real problem, so here is our use case in case it helps shape the scope.
**Our use case**
We build wide primary-key tables in Fluss with partial updates: two large source tables each write their own columns of the same row. The first run has to load the full history, about 1.2B rows, into an empty table. Today that goes through the normal write path, one read-modify-write per row.
**What that costs us today**
| | |
|---|---|
| Time | Most of a day at 16–26k rows/s. The table's bucket count sets the pace, not Flink resources (#5232). |
| Other tables | The load slows every table on the same tablet servers. putKv p99 hit 26–41 s (#4926), and other jobs timed out. |
| Changelog | Every intermediate version is logged: ~1.7B records that tiering, remote log upload and KV snapshots must then process. |
| Checkpoints | They took 5–10 min under the load (#5234), so every restart replayed a lot of work. |
**How bulk load would help**
We would build the joined rows once in a Flink batch job from the lake copies of both sources, load them as a KV snapshot, and then start the streaming job for new changes only. The tablet servers stay free for other work, no intermediate versions are written, and the bootstrap no longer takes a day.
**Three questions about the handoff to streaming**
1. **Start point.** Can a loaded table record the source offsets (or lake snapshot) it was built from, so a streaming job can continue from there with no gap and no double counting? Replays are harmless for partial updates, but not for aggregations.
2. **Merge engines.** Will tables with partial update or aggregation be valid targets, with the loaded rows as the starting values?
3. **Downstream readers.** Does a bulk load produce a changelog, or does tiering pick up the loaded snapshot directly? Readers such as lake tiering need a clear way to see the initial data.
We're happy to test the Flink batch integration against this workload when it's ready.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org