Skip to content

Commit b2942df

Browse files
committed
cluster: recovery for cloud topics metastore and topics
This implements the body of the cluster restore stages for cloud topics, by restoring the metastore, and then calling create topics on all the desired cloud topics. One of the invariants that we're trying to uphold is that the metastore topic will have the same remote_label after restoring as the original, in order (this has the nice property of being able to point at the metastore from a topic manifest, e.g. for read replicas). To that end, restoring the metastore looks like: 1. creating the metastore topic 2. calling restore 3. upon success, updating the metastore topic's remote_label to be what it was in the dead cluster After this happens, we go ahead and create all the cloud topics, which is only partially implemented in this commit: we create the topics, but additional logic is needed to get the restored topics to bootstrap their ctp_stms from the metastore. That is left as separate work.
1 parent a6a1e19 commit b2942df

File tree

10 files changed

+718
-113
lines changed

10 files changed

+718
-113
lines changed

src/v/cloud_topics/tests/BUILD

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,27 @@ redpanda_cc_gtest(
9292
"@googletest//:gtest",
9393
],
9494
)
95+
96+
redpanda_cc_gtest(
97+
name = "cluster_recovery_test",
98+
timeout = "moderate",
99+
srcs = [
100+
"cluster_recovery_test.cc",
101+
],
102+
cpu = 1,
103+
deps = [
104+
":cluster_fixture",
105+
"//src/v/cloud_storage",
106+
"//src/v/cluster",
107+
"//src/v/cluster/cloud_metadata/tests:cluster_metadata_utils",
108+
"//src/v/kafka/server/tests:kafka_test_utils",
109+
"//src/v/random:generators",
110+
"//src/v/ssx:future_util",
111+
"//src/v/ssx:sformat",
112+
"//src/v/test_utils:gtest",
113+
"//src/v/test_utils:scoped_config",
114+
"//src/v/utils:retry_chain_node",
115+
"@googletest//:gtest",
116+
"@seastar",
117+
],
118+
)

0 commit comments

Comments
 (0)