From 276f0c349ebbb02ba3eaaa2bee3f724151d33cb5 Mon Sep 17 00:00:00 2001 From: dingo Date: Sun, 11 Oct 2026 22:41:40 -0400 Subject: [PATCH] Format cellular publication diagnostics --- src/server/cellular_region_host.cpp | 10 ++++------ tests/cellular_publication_tests.cpp | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/server/cellular_region_host.cpp b/src/server/cellular_region_host.cpp index 2ac775a..205210e 100644 --- a/src/server/cellular_region_host.cpp +++ b/src/server/cellular_region_host.cpp @@ -300,8 +300,7 @@ CellularRegionHost::publish(const CellularBatch& batch, const auto grant = authority_.grant(); if (!status_.ready || !state_ || !committed_ || !grant || !authority_.may_begin_commit(LeaseClock::now())) - return std::unexpected{ - CellularPublishFailure{CellularHostError::not_ready, {}, {}, {}}}; + return std::unexpected{CellularPublishFailure{CellularHostError::not_ready, {}, {}, {}}}; auto candidate = replay_cellular_batch(*state_, batch); if (!candidate) return std::unexpected{ @@ -335,10 +334,9 @@ CellularRegionHost::publish(const CellularBatch& batch, status_.ready = false; ++status_.fences; } - return std::unexpected{CellularPublishFailure{CellularHostError::publication, - published.error().kind, - published.error().store, - published.error().object}}; + return std::unexpected{ + CellularPublishFailure{CellularHostError::publication, published.error().kind, + published.error().store, published.error().object}}; } state_ = std::move(*candidate); committed_ = published->committed; diff --git a/tests/cellular_publication_tests.cpp b/tests/cellular_publication_tests.cpp index 6c0d587..bf3e2aa 100644 --- a/tests/cellular_publication_tests.cpp +++ b/tests/cellular_publication_tests.cpp @@ -142,8 +142,8 @@ void cellular_birth_publication_is_durable() { auto message = "cellular host publish failed, error=" + std::to_string(static_cast(failure.kind)); if (failure.publication) - message += ", publication=" + - std::to_string(static_cast(*failure.publication)); + message += + ", publication=" + std::to_string(static_cast(*failure.publication)); if (failure.store) { message += ", store=" + std::to_string(static_cast(failure.store->kind)); const auto& state = failure.store->cause.sqlstate;