diff --git a/src/v/cloud_storage/segment_chunk.cc b/src/v/cloud_storage/segment_chunk.cc index fb0f951cdf8c3..6594a9db19edb 100644 --- a/src/v/cloud_storage/segment_chunk.cc +++ b/src/v/cloud_storage/segment_chunk.cc @@ -12,6 +12,17 @@ namespace cloud_storage { +std::ostream& operator<<(std::ostream& os, chunk_state c) { + switch (c) { + case chunk_state::not_available: + return os << "not available"; + case chunk_state::download_in_progress: + return os << "download in progress"; + case chunk_state::hydrated: + return os << "hydrated"; + } +} + std::strong_ordering segment_chunk::operator<=>(const segment_chunk& chunk) const { const auto cmp = required_by_readers_in_future diff --git a/src/v/cloud_storage/segment_chunk.h b/src/v/cloud_storage/segment_chunk.h index e2ccff522fcbe..5bad7d9be89fb 100644 --- a/src/v/cloud_storage/segment_chunk.h +++ b/src/v/cloud_storage/segment_chunk.h @@ -30,6 +30,8 @@ enum class chunk_state { hydrated, }; +std::ostream& operator<<(std::ostream& os, chunk_state); + struct segment_chunk { chunk_state current_state;