forked from redpanda-data/redpanda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request redpanda-data#23960 from nvartolomei/nv/dl_stm-sna…
…pshot ct: dl_stm mvcc snapshot
- Loading branch information
Showing
17 changed files
with
569 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ v_cc_library( | |
NAME cloud_topics_base | ||
SRCS | ||
dl_overlay.cc | ||
dl_snapshot.cc | ||
logger.cc | ||
types.cc | ||
DEPS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2024 Redpanda Data, Inc. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.md | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0 | ||
|
||
#include "cloud_topics/dl_snapshot.h" | ||
|
||
auto fmt::formatter<experimental::cloud_topics::dl_snapshot_id>::format( | ||
const experimental::cloud_topics::dl_snapshot_id& id, | ||
fmt::format_context& ctx) const -> decltype(ctx.out()) { | ||
return fmt::format_to(ctx.out(), "{}", id.version); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright 2024 Redpanda Data, Inc. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.md | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0 | ||
|
||
#pragma once | ||
|
||
#include "cloud_topics/dl_overlay.h" | ||
#include "cloud_topics/dl_version.h" | ||
#include "container/fragmented_vector.h" | ||
#include "serde/envelope.h" | ||
|
||
namespace experimental::cloud_topics { | ||
|
||
struct dl_snapshot_id | ||
: serde:: | ||
envelope<dl_snapshot_id, serde::version<0>, serde::compat_version<0>> { | ||
dl_snapshot_id() noexcept = default; | ||
|
||
explicit dl_snapshot_id(dl_version version) noexcept | ||
: version(version) {} | ||
|
||
auto serde_fields() { return std::tie(version); } | ||
|
||
bool operator==(const dl_snapshot_id& other) const noexcept = default; | ||
|
||
/// Version for which the snapshot is created. | ||
dl_version version; | ||
}; | ||
|
||
struct dl_snapshot_payload | ||
: serde::checksum_envelope< | ||
dl_snapshot_id, | ||
serde::version<0>, | ||
serde::compat_version<0>> { | ||
/// Version for which the snapshot is created. | ||
dl_snapshot_id id; | ||
|
||
/// Overlays visible at the snapshot version. | ||
fragmented_vector<dl_overlay> overlays; | ||
}; | ||
|
||
}; // namespace experimental::cloud_topics | ||
|
||
template<> | ||
struct fmt::formatter<experimental::cloud_topics::dl_snapshot_id> | ||
: fmt::formatter<std::string_view> { | ||
auto format( | ||
const experimental::cloud_topics::dl_snapshot_id&, | ||
fmt::format_context& ctx) const -> decltype(ctx.out()); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.