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

Require serde_fields for all serde structs #22782

Closed
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e1500c1
cs: serde_fields for lifecycle_marker
oleiman Aug 7, 2024
15d2162
cs: serde_fields for partition_manifest_serde
oleiman Aug 7, 2024
69606c3
cs: serde_fields for partition_manifest::lw_segment_meta
oleiman Aug 7, 2024
c82c0f8
cs: serde_fields for offset_index_header
oleiman Aug 7, 2024
88aa996
c/archival: serde_fields for archival_metadata_stm structs
oleiman Aug 7, 2024
26a9b1d
c: serde_fields for client_quota_serde structs
oleiman Aug 7, 2024
de2cad6
c/node: serde_fields for local_state
oleiman Aug 7, 2024
d64ee9a
c: serde_fields for prefix_truncate_record
oleiman Aug 7, 2024
c85e87e
c: serde_fields for self_test_rpc_types
oleiman Aug 7, 2024
4d114dc
c: serde_fields for data_migration_types
oleiman Aug 21, 2024
be74ea9
c: serde_fields for node_status_rpc_types
oleiman Aug 21, 2024
80498ba
c/recovery: serde_fields for status_request
oleiman Aug 21, 2024
ba0e881
c/types: serde_fields for controller_committed_offset_request
oleiman Aug 21, 2024
3ea3a74
c/test: serde_fields for commands_serialization_test
oleiman Aug 21, 2024
e6465bf
rp: serde_fields for application::crash_tracker_metadata
oleiman Aug 7, 2024
8f39ee3
storage: serde_fields for persisted_batches_map
oleiman Aug 7, 2024
4d13a42
storage: serde_fields for clean_segment_value
oleiman Aug 21, 2024
73008ac
feat: serde_fields for feature_table::version_fence
oleiman Aug 21, 2024
f246b22
model/x: serde_fields for transform_offset_options
oleiman Aug 21, 2024
84471dd
m/x/tests: serde_fields for legacy_transform_offset_options_2
oleiman Aug 21, 2024
3eab8ee
serde/test: serde_fields for various structs
oleiman Aug 7, 2024
7019be2
serde/test: serde_fields for serde_rpbench structs
oleiman Aug 7, 2024
e3b8d0b
serde/test: update jinja to generate serde_fields for gen'ed structs
oleiman Aug 7, 2024
96a251d
cs/test: serde_fields for various structs in partition_manifest_test
oleiman Aug 7, 2024
2a2413b
c/test: serde_fields for archival_metadata_stm_test
oleiman Aug 7, 2024
4f45da5
rpc/test: serde_fields for various rpc_gen_types
oleiman Aug 7, 2024
315be73
utils/test: serde_fields for uuid_test::uuid_struct
oleiman Aug 7, 2024
9cb7bce
s/mvlog: serde_fields for record_batch_entry_body
oleiman Aug 7, 2024
1c0ee0f
serde: Require T::serde_fields for all serde structs
oleiman Aug 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/v/cluster/archival/archival_metadata_stm.cc
Copy link
Member Author

@oleiman oleiman Aug 24, 2024

Choose a reason for hiding this comment

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

commit msg is out of date

Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,17 @@ struct archival_metadata_stm::segment
// Segment meta value generated by old redpanda versions will have the
// default value of 'no'.
segment_validated is_validated{segment_validated::no};

auto serde_fields() {
return std::tie(ntp_revision_deprecated, name, meta, is_validated);
}
};

struct archival_metadata_stm::start_offset
: public serde::
envelope<start_offset, serde::version<0>, serde::compat_version<0>> {
model::offset start_offset;
auto serde_fields() { return std::tie(start_offset); }
};

struct archival_metadata_stm::start_offset_with_delta
Expand All @@ -99,6 +104,7 @@ struct archival_metadata_stm::start_offset_with_delta
serde::compat_version<0>> {
model::offset start_offset;
model::offset_delta delta;
auto serde_fields() { return std::tie(start_offset, delta); }
};

struct archival_metadata_stm::add_segment_cmd {
Expand Down Expand Up @@ -142,6 +148,7 @@ struct archival_metadata_stm::truncate_archive_commit_cmd {
: serde::envelope<value, serde::version<0>, serde::compat_version<0>> {
model::offset start_offset;
uint64_t bytes_removed;
auto serde_fields() { return std::tie(start_offset, bytes_removed); }
};
};

Expand All @@ -164,6 +171,8 @@ struct archival_metadata_stm::spillover_cmd
static constexpr cmd_key key{9};

cloud_storage::segment_meta manifest_meta;

auto serde_fields() { return std::tie(manifest_meta); }
};

struct archival_metadata_stm::replace_manifest_cmd {
Expand Down Expand Up @@ -208,6 +217,8 @@ struct archival_metadata_stm::read_write_fence_cmd
static constexpr cmd_key key{14};

model::offset last_applied_offset;

auto serde_fields() { return std::tie(last_applied_offset); }
};

// Serde format description
Expand Down