1414#include " cloud_topics/data_plane_api.h"
1515#include " cloud_topics/data_plane_impl.h"
1616#include " cloud_topics/housekeeper/manager.h"
17+ #include " cloud_topics/level_one/compaction/scheduler.h"
1718#include " cloud_topics/level_one/metastore/topic_purger.h"
1819#include " cloud_topics/level_zero/gc/level_zero_gc.h"
1920#include " cloud_topics/manager/manager.h"
@@ -113,6 +114,16 @@ ss::future<> app::construct(
113114 return &replicated_metastore.local ();
114115 }));
115116
117+ construct_single_service (
118+ compaction_scheduler,
119+ l1::compaction_cluster_state{
120+ .self = self,
121+ .leaders_table = leaders_table,
122+ .topic_table = &controller->get_topics_state (),
123+ .metadata_cache = metadata_cache},
124+ &l1_io,
125+ &replicated_metastore);
126+
116127 // Must be last to register so it will be first to be stopped in
117128 // `app::stop`. This is to ensure that stopped services don't receive
118129 // callbacks.
@@ -129,6 +140,7 @@ ss::future<> app::start() {
129140 co_await domain_supervisor.invoke_on_all (
130141 [](auto & ds) { return ds.start (); });
131142 co_await housekeeper_manager.invoke_on_all (&housekeeper_manager::start);
143+ co_await compaction_scheduler->start ();
132144
133145 // When start is called, we must have registered all the callbacks before
134146 // this as starting the manager will invoke callbacks for partitions already
@@ -228,4 +240,8 @@ ss::sharded<l1::replicated_metastore>* app::get_sharded_replicated_metastore() {
228240 return &replicated_metastore;
229241}
230242
243+ l1::compaction_scheduler* app::get_compaction_scheduler () {
244+ return compaction_scheduler.get ();
245+ }
246+
231247} // namespace cloud_topics
0 commit comments