Skip to content

ct: cloud topics compaction configs #29287

Merged
dotnwat merged 5 commits into
redpanda-data:devfrom
WillemKauf:cloud_topics_compaction_configs
Jan 29, 2026
Merged

ct: cloud topics compaction configs #29287
dotnwat merged 5 commits into
redpanda-data:devfrom
WillemKauf:cloud_topics_compaction_configs

Conversation

@WillemKauf

@WillemKauf WillemKauf commented Jan 16, 2026

Copy link
Copy Markdown
Contributor
  • cloud_topics_compaction_max_object_size
  • cloud_topics_compaction_interval_ms
  • cloud_topics_compaction_key_map_memory

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
  • v25.3.x
  • v25.2.x
  • v25.1.x

Release Notes

  • none

For controlling the size of L1 objects produced during compaction.
For controlling the frequency of cloud topics compaction (separate
from local storage compaction interval).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces three new configuration parameters for cloud topics compaction: cloud_topics_compaction_max_object_size, cloud_topics_compaction_interval_ms, and cloud_topics_compaction_key_map_memory. These configurations allow independent tuning of cloud topics compaction behavior, separate from the existing general compaction settings.

Changes:

  • Added three new cloud topics compaction configuration properties with appropriate defaults and bounds
  • Updated memory reservation system to allocate separate memory for cloud topics compaction
  • Modified compaction worker, scheduler, and sink components to use the new cloud-topics-specific configurations instead of general compaction settings
  • Updated tests to reference the new configuration parameter names

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/v/config/configuration.h Declared three new configuration properties for cloud topics compaction
src/v/config/configuration.cc Defined the new configuration properties with defaults and metadata
src/v/resource_mgmt/memory_groups.h Added struct and methods for cloud topics compaction memory reservation
src/v/resource_mgmt/memory_groups.cc Implemented memory reservation logic for cloud topics compaction
src/v/cloud_topics/level_one/compaction/worker.h Added config binding for compaction interval
src/v/cloud_topics/level_one/compaction/worker.cc Updated worker to use new cloud topics compaction configs and memory reservation
src/v/cloud_topics/level_one/compaction/sink.h Changed max object size from constant to config binding
src/v/cloud_topics/level_one/compaction/sink.cc Updated sink to use configurable max object size
src/v/cloud_topics/level_one/compaction/scheduler.h Updated comment to reference new config name
src/v/cloud_topics/level_one/compaction/scheduler.cc Changed scheduler to bind to new cloud topics compaction interval config
src/v/cloud_topics/level_one/compaction/log_info_collector.cc Updated to use new cloud topics compaction interval config
tests/rptest/tests/random_node_operations_smoke_test.py Added cloud topics compaction interval config to test setup
tests/rptest/tests/cloud_topics/iceberg_test.py Replaced log compaction interval with cloud topics compaction interval
tests/rptest/tests/cloud_topics/e2e_test.py Updated test to use new cloud topics compaction config parameters
src/v/cloud_topics/level_one/compaction/tests/reducer_test.cc Added mock binding for max object size in test
src/v/cloud_topics/level_one/compaction/tests/scheduler_test.cc Updated test to use new config name
src/v/cloud_topics/level_one/compaction/tests/scheduler_multithread_test.cc Updated test to use new config name
src/v/cloud_topics/level_one/compaction/tests/BUILD Added config dependency for tests
src/v/cloud_topics/level_one/compaction/BUILD Added config and memory_groups dependencies

Comment thread src/v/resource_mgmt/memory_groups.cc
Comment thread src/v/cloud_topics/level_one/compaction/worker.cc
@WillemKauf WillemKauf force-pushed the cloud_topics_compaction_configs branch 2 times, most recently from 8003aab to 1951e44 Compare January 16, 2026 15:39
@vbotbuildovich

Copy link
Copy Markdown
Collaborator

Retry command for Build#79169

please wait until all jobs are finished before running the slash command

/ci-repeat 1
skip-redpanda-build
skip-units
skip-rebase
tests/rptest/tests/random_node_operations_smoke_test.py::RedpandaNodeOperationsSmokeTest.test_node_ops_smoke_test@{"cloud_storage_type":1,"mixed_versions":false}

@WillemKauf WillemKauf force-pushed the cloud_topics_compaction_configs branch 2 times, most recently from f6f9fa6 to 228c3d5 Compare January 16, 2026 18:06
And the related memory group reservation, separate from that used
for local storage.
We were trying to catch the wrong kind of exception here...
@WillemKauf WillemKauf force-pushed the cloud_topics_compaction_configs branch from 228c3d5 to 8b2dd83 Compare January 16, 2026 18:07
@vbotbuildovich

Copy link
Copy Markdown
Collaborator

Retry command for Build#79199

please wait until all jobs are finished before running the slash command

/ci-repeat 1
skip-redpanda-build
skip-units
skip-rebase
tests/rptest/tests/cluster_linking_e2e_test.py::ShadowLinkingMetricsTests.test_link_metrics

@vbotbuildovich

Copy link
Copy Markdown
Collaborator

CI test results

test results on build#79199
test_class test_method test_arguments test_kind job_url test_status passed reason test_history
ClusterConfigAliasTest test_aliasing_with_upgrade {"prop_set_name": "cloud_storage_graceful_transfer_timeout", "wipe_cache": true} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ClusterConfigAliasTest&test_method=test_aliasing_with_upgrade
ClusterConfigLegacyDefaultTest test_legacy_default_explicit_after_upgrade {"wipe_cache": true} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ClusterConfigLegacyDefaultTest&test_method=test_legacy_default_explicit_after_upgrade
ClusterConfigLegacyDefaultTest test_removal_of_legacy_default_defaulted {"wipe_cache": true} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d5-4240-82aa-c143eef24dd7 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ClusterConfigLegacyDefaultTest&test_method=test_removal_of_legacy_default_defaulted
ShadowLinkingMetricsTests test_link_metrics null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80b-b4e2-43f2-a1bb-98186280ffcf FLAKY 13/21 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0899, p0=0.0013, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ShadowLinkingMetricsTests&test_method=test_link_metrics
ClusterMetadataUploadTest test_uploads_after_wipe {"cloud_storage_type": 2} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ClusterMetadataUploadTest&test_method=test_uploads_after_wipe
ControlCharacterNag test_validate_no_nag_in_new_cluster null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ControlCharacterNag&test_method=test_validate_no_nag_in_new_cluster
ControlCharacterPermittedAfterUpgrade test_upgrade_from_pre_v23_2 {"initial_version_as_list": [23, 1, 1]} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d5-4240-82aa-c143eef24dd7 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ControlCharacterPermittedAfterUpgrade&test_method=test_upgrade_from_pre_v23_2
CertificateRevocationTest test_pp_api null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=CertificateRevocationTest&test_method=test_pp_api
DataMigrationsApiTest test_creating_when_cluster_misconfigured1 null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=DataMigrationsApiTest&test_method=test_creating_when_cluster_misconfigured1
DataMigrationsApiTest test_transactions {"transfer_leadership": true} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=DataMigrationsApiTest&test_method=test_transactions
DataTransformsTest test_consume_junk_off {"offset": "+NaN"} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=DataTransformsTest&test_method=test_consume_junk_off
DatalakeE2ETests test_avro_schema {"catalog_type": "rest_jdbc", "cloud_storage_type": 1, "query_engine": "spark"} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=DatalakeE2ETests&test_method=test_avro_schema
DatalakeE2ETests test_avro_schema {"catalog_type": "nessie", "cloud_storage_type": 1, "query_engine": "trino"} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d2-44f0-b2b9-56b00c3e084a FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=DatalakeE2ETests&test_method=test_avro_schema
DatalakeE2ETests test_field_names_compat {"catalog_type": "nessie", "cloud_storage_type": 1, "query_engine": "spark"} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=DatalakeE2ETests&test_method=test_field_names_compat
DatalakeE2ETests test_iceberg_partition_key_file_location {"catalog_type": "nessie", "cloud_storage_type": 1, "custom_partition_spec": "(timestamp_us)"} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=DatalakeE2ETests&test_method=test_iceberg_partition_key_file_location
DatalakeE2ETests test_protobuf_references {"catalog_type": "rest_jdbc", "cloud_storage_type": 1, "query_engine": "spark"} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=DatalakeE2ETests&test_method=test_protobuf_references
DuckDBTest test_e2e_basic {"cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=DuckDBTest&test_method=test_e2e_basic
MountUnmountIcebergTest test_simple_remount {"cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d0-4064-8b15-f91259b05d01 FLAKY 8/11 Test PASSES after retries.No significant increase in flaky rate(baseline=0.1810, p0=0.5641, reject_threshold=0.0100. adj_baseline=0.4506, p1=0.0989, trust_threshold=0.5000) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=MountUnmountIcebergTest&test_method=test_simple_remount
SchemaScaleTest schema_scale_test {"catalog_type": "nessie", "cloud_storage_type": 1, "query_engine": "spark", "use_partition_spec": false} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=SchemaScaleTest&test_method=schema_scale_test
SchemaScaleTest schema_scale_test {"catalog_type": "rest_hadoop", "cloud_storage_type": 1, "query_engine": "spark", "use_partition_spec": false} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d2-44f0-b2b9-56b00c3e084a FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=SchemaScaleTest&test_method=schema_scale_test
SchemaScaleTest schema_scale_test {"catalog_type": "rest_hadoop", "cloud_storage_type": 1, "query_engine": "trino", "use_partition_spec": false} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d5-4240-82aa-c143eef24dd7 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=SchemaScaleTest&test_method=schema_scale_test
DeleteRecordsTest test_delete_records_segment_deletion {"cloud_storage_enabled": true, "truncate_point": "at_segment_boundary"} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=DeleteRecordsTest&test_method=test_delete_records_segment_deletion
UpgradeMigratingLicenseVersion test_license_upgrade {"cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d2-44f0-b2b9-56b00c3e084a FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=UpgradeMigratingLicenseVersion&test_method=test_license_upgrade
OffsetTranslatorConsistencyTest test_offset_translator_state_consistent null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=OffsetTranslatorConsistencyTest&test_method=test_offset_translator_state_consistent
PrefixTruncateRecoveryUpgradeTest test_recover_during_upgrade null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d5-4240-82aa-c143eef24dd7 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=PrefixTruncateRecoveryUpgradeTest&test_method=test_recover_during_upgrade
RaftAvailabilityTest test_id_allocator_leader_isolation null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d5-4240-82aa-c143eef24dd7 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=RaftAvailabilityTest&test_method=test_id_allocator_leader_isolation
RaftAvailabilityTest test_two_nodes_down null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d2-44f0-b2b9-56b00c3e084a FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=RaftAvailabilityTest&test_method=test_two_nodes_down
RetentionPolicyTest test_changing_topic_retention {"acks": -1, "cloud_storage_type": 1, "property": "retention.ms"} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d2-44f0-b2b9-56b00c3e084a FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=RetentionPolicyTest&test_method=test_changing_topic_retention
ShadowIndexingCloudRetentionTest test_cloud_size_based_retention {"cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ShadowIndexingCloudRetentionTest&test_method=test_cloud_size_based_retention
RpkClusterTest test_upload_cluster_license_error null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d2-44f0-b2b9-56b00c3e084a FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=RpkClusterTest&test_method=test_upload_cluster_license_error
SelfTestTest test_self_test_mixed_node_controller_lower_version null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d2-44f0-b2b9-56b00c3e084a FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=SelfTestTest&test_method=test_self_test_mixed_node_controller_lower_version
SIAdminApiTest test_manifest_dump null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=SIAdminApiTest&test_method=test_manifest_dump
SIAdminApiTest test_topic_recovery_on_leader null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d2-44f0-b2b9-56b00c3e084a FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=SIAdminApiTest&test_method=test_topic_recovery_on_leader
TieredStorageTest test_tiered_storage {"cloud_storage_type_and_url_style": [1, "path"], "test_case": {"name": "(TS_Read == True, SegmentRolledByTimeout == True)"}} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=TieredStorageTest&test_method=test_tiered_storage
TieredStorageTest test_tiered_storage {"cloud_storage_type_and_url_style": [1, "virtual_host"], "test_case": {"name": "(TS_Read == True, SegmentRolledByTimeout == True)"}} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=TieredStorageTest&test_method=test_tiered_storage
CreateTopicsTest test_batch_max_bytes_validation null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d5-4240-82aa-c143eef24dd7 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=CreateTopicsTest&test_method=test_batch_max_bytes_validation
CreateTopicsTest test_no_log_bloat_when_recreating_existing_topics null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=CreateTopicsTest&test_method=test_no_log_bloat_when_recreating_existing_topics
RapidTopicRecreateTest test_topic_rapid_recreation null integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d2-44f0-b2b9-56b00c3e084a FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=RapidTopicRecreateTest&test_method=test_topic_rapid_recreation
TopicRecoveryTest test_many_partitions {"check_mode": "check_manifest_existence", "cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=TopicRecoveryTest&test_method=test_many_partitions
UpgradeFromPriorFeatureVersionCloudStorageTest test_rolling_upgrade {"cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=UpgradeFromPriorFeatureVersionCloudStorageTest&test_method=test_rolling_upgrade
TxVerifierTest test_all_tx_tests {"cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/79199#019bc80a-91d1-4579-b956-1161dd052283 FAIL 0/1 https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=TxVerifierTest&test_method=test_all_tx_tests

: _compaction_reserved_memory(
compaction.reserved_bytes(total_available_memory))
, _cloud_topics_compaction_reserved_memory(
cloud_topics_compaction.reserved_bytes())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

curious why reserved_bytes here isn't a function of the total available memory like the other reservations?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I didn't add a option to configure the reserved memory as a percentage a la storage_compaction_key_map_memory_limit_percent, so we will always just reserve a flat cloud_topics_compaction_key_map_memory.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ahh, that's what I had figured. thanks

@WillemKauf

WillemKauf commented Jan 21, 2026

Copy link
Copy Markdown
Contributor Author

One side effect of this is that we now allocate 256 MiB (per shard) by default for local storage compaction + cloud topics compaction.

@WillemKauf

Copy link
Copy Markdown
Contributor Author

@dotnwat based on our conversations here, is this mergeable in its current form?

@dotnwat dotnwat merged commit b508dbc into redpanda-data:dev Jan 29, 2026
21 checks passed
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