Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iceberg custom partitioning: use configured spec when creating the table #24952

Merged
merged 6 commits into from
Jan 30, 2025

Conversation

ztlpn
Copy link
Contributor

@ztlpn ztlpn commented Jan 28, 2025

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.3.x
  • v24.2.x
  • v24.1.x

Release Notes

Features

  • Add custom partitioning of Iceberg tables: partition spec of a newly created Iceberg table is now determined by the redpanda.iceberg.partition.spec topic property.

@vbotbuildovich
Copy link
Collaborator

vbotbuildovich commented Jan 28, 2025

CI test results

test results on build#61260
test_id test_kind job_url test_status passed
rptest.tests.scaling_up_test.ScalingUpTest.test_scaling_up_with_recovered_topic ducktape https://buildkite.com/redpanda/redpanda/builds/61260#0194aa9b-5eec-4c9a-8378-3d35c1bcdcc9 FLAKY 1/2
test results on build#61380
test_id test_kind job_url test_status passed
rptest.tests.compaction_recovery_test.CompactionRecoveryUpgradeTest.test_index_recovery_after_upgrade ducktape https://buildkite.com/redpanda/redpanda/builds/61380#0194b513-181c-4843-bf96-2bc3ed27fdd6 FLAKY 1/2
rptest.tests.scaling_up_test.ScalingUpTest.test_scaling_up_with_recovered_topic ducktape https://buildkite.com/redpanda/redpanda/builds/61380#0194b513-181c-4843-bf96-2bc3ed27fdd6 FLAKY 1/2

Copy link
Contributor

@andrwng andrwng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good

src/v/datalake/coordinator/coordinator.cc Outdated Show resolved Hide resolved
@@ -249,19 +249,31 @@ checked<ss::gate::holder, coordinator::errc> coordinator::maybe_gate() {
return gate_.hold();
}

struct coordinator::table_schema_provider {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: just a thought, this file is getting a bit crowded to read through with the different implementations of this schema provider sprinkled throughout. Might be easier on the eyes to separate it out into its own header and cc

Copy link
Contributor Author

@ztlpn ztlpn Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kind of like it being close to the respective functions as the only reason for existence of these classes is to factor out differences in those functions

@@ -251,13 +251,9 @@ redpanda_cc_library(
hdrs = [
"table_definition.h",
],
implementation_deps = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

# key to ensure that all partitions get some records
key=str(uuid4()),
value=record)
producer.flush()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible for us to get very unlucky and for the records in this batch to also be in different hours?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, I was intending to have the same timestamp_us value for all records and partition based on that, but forgot to change the spec expression.

@ztlpn ztlpn force-pushed the iceberg-cp-use-config branch from 7cbce89 to b434da9 Compare January 30, 2025 01:44
@ztlpn ztlpn requested review from andrwng and mmaslankaprv January 30, 2025 01:46
@ztlpn ztlpn merged commit 598b47c into redpanda-data:dev Jan 30, 2025
18 checks passed
@ztlpn ztlpn deleted the iceberg-cp-use-config branch January 30, 2025 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants