Skip to content

Reduce redundant formatting and batch copies in Paimon log ingestion - #703

Open
jordepic wants to merge 4 commits into
datafusion-contrib:mainfrom
jordepic:perf/paimon-log-sink-followup
Open

jordepic wants to merge 4 commits into
datafusion-contrib:mainfrom
jordepic:perf/paimon-log-sink-followup

Conversation

@jordepic

@jordepic jordepic commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add an opt-in release benchmark for the write-only, time-partitioned Paimon log sink. It checks the submitted native graph, periodic checkpoints, Parquet writers, and every committed row.
  • Document the historical routing regression and the upstream local-routing fix. The controlled routing ablation on the November 20 checkout measured 1.16× throughput.
  • Format numeric date fields directly in FROM_UNIXTIME and borrow full batch ranges in the native Parquet encoder. The isolated date-partition Calc median fell from 30.43 ms to 19.78 ms with matching output checksums.

Validation

  • The initial Flink 1.18 and 2.2 Paimon CI shards exposed an allocator lifetime regression from sharing input arrays across the routing boundary. The final candidate restores the upstream routing implementation.
  • All 18 focused Flink 1.18 checks and 46 focused Flink 2.2 checks passed, including both dynamic partition tests, routing, append recovery, and Parquet writer parity. Flink 2.2 also covered date and timezone SQL parity.
  • An upstream native benchmark trial read back 3,994,304 of 4,000,000 rows. The upstream repeat, stock Flink, and the final candidate each passed three complete jobs with exact readback. The benchmark retains the assertions and documents the unresolved discrepancy.
  • The Rust Parquet range test and focused stateless date tests passed. Local release builds used mimalloc. Strict MkDocs and 18 documentation, inventory, and evidence checks passed.

Fork qualification

Measure a complete write-only append job with an SLS-shaped row source, the date partition projection, checkpoint commits, and exact stock readback. Verify the submitted native graph and file encoders and retain the release checkout comparisons, isolated routing ablation, and CPU and allocation profile findings.

Restoring local routing on the November 20 checkout improves median throughput 1.16x. Current upstream processes 2.12 million rows per second on the same four-writer shape. The alternate single-writer path did not establish an elapsed-time improvement.
Write ordinary numeric FROM_UNIXTIME fields directly and keep timezone addition on the narrow path when it fits. Reuse the input arrays for a single Paimon destination and borrow full ranges at the Parquet writer.

Matched release jobs reduced median elapsed time by 7.0% and 3.6% at one and four active partitions. The 24-partition comparison was flat. The prepared date partition Calc fell from 30.43 ms to 19.78 ms with identical output checksums.
Keep routing materialized across the Java allocator boundary. Retain the formatter and Parquet range improvements, and document exact readback controls on the released Paimon path.

This branch has not been deployed

No deployments
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.

1 participant