Skip to content

[python][ray] Fix HASH_FIXED primary-key writer ownership#8541

Open
QuakeWang wants to merge 1 commit into
apache:masterfrom
QuakeWang:ray-pk-safety
Open

[python][ray] Fix HASH_FIXED primary-key writer ownership#8541
QuakeWang wants to merge 1 commit into
apache:masterfrom
QuakeWang:ray-pk-safety

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

Ray map_groups only keeps a (partition, bucket) group intact while the UDF runs. Its output may be split before PaimonDatasink, so sink options that prevent operator fusion can create multiple independent writers for one bucket with overlapping sequence numbers.

This change writes each HASH_FIXED primary-key group inside the map_groups UDF, returns serialized commit messages, and commits them on the driver. Writer concurrency and remote options are applied directly to the group tasks.

Tests

  • Added regression coverage for output block splitting and non-fused writer options.
  • Added grouped overwrite and empty-overwrite coverage.
  • Passed Ray 2.54.0 and 2.56.0 related tests, full Python flake8, license checks, and docs build.

Ray map_groups keeps each group intact only while invoking the UDF. Its output can be split before a downstream datasink, so operator fusion changes can create multiple writers for one bucket and overlapping sequence numbers.

Write each primary-key group inside the map_groups UDF and return serialized commit messages for the driver to commit. Apply writer task options to the group UDF and cover output splitting and overwrite behavior.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
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