Avoid unchecked cellular action block access
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m58s
Foundation / checks (client) (push) Successful in 13m42s
Foundation / checks (network) (push) Successful in 15m19s
Foundation / checks (tsan) (push) Successful in 8m38s
Foundation / checks (postgres) (push) Failing after 20m2s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 35m19s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m58s
Foundation / checks (client) (push) Successful in 13m42s
Foundation / checks (network) (push) Successful in 15m19s
Foundation / checks (tsan) (push) Successful in 8m38s
Foundation / checks (postgres) (push) Failing after 20m2s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 35m19s
This commit is contained in:
@@ -6907,3 +6907,9 @@ the PostgreSQL-enabled analysis target. Recovery now copies the optional record,
|
|||||||
checks its presence, and reads it through `value_or`, keeping a missing committed
|
checks its presence, and reads it through `value_or`, keeping a missing committed
|
||||||
action classified as a history failure. The PostgreSQL job failed, so the
|
action classified as a history failure. The PostgreSQL job failed, so the
|
||||||
dependent server-image build and Harbor publication did not start.
|
dependent server-image build and Harbor publication did not start.
|
||||||
|
|
||||||
|
CI run #289 confirmed that record-access repair and found a second nested optional
|
||||||
|
access at `src/persistence/cellular_checkpoint_store.cpp:550`: the stored action
|
||||||
|
block inside the successful database result. Recovery now validates that the
|
||||||
|
block is present and decodes a `value_or` copy. The PostgreSQL job failed on this
|
||||||
|
diagnostic, so this run also did not start server-image or Harbor publication.
|
||||||
|
|||||||
@@ -491,6 +491,7 @@ recover_cellular_checkpoint(Postgres& db, const FilesystemObjectStore& objects,
|
|||||||
return std::unexpected{RecoveryFailure{RecoveryError::store, action_bytes.error()}};
|
return std::unexpected{RecoveryFailure{RecoveryError::store, action_bytes.error()}};
|
||||||
if (!*action_bytes)
|
if (!*action_bytes)
|
||||||
return fail_with(RecoveryError::history);
|
return fail_with(RecoveryError::history);
|
||||||
|
const auto encoded_actions = action_bytes->value_or(std::vector<std::uint8_t>{});
|
||||||
|
|
||||||
auto trace_bytes = objects.get({manifest->batch.trace_sha256, manifest->batch.trace_bytes});
|
auto trace_bytes = objects.get({manifest->batch.trace_sha256, manifest->batch.trace_bytes});
|
||||||
if (!trace_bytes)
|
if (!trace_bytes)
|
||||||
@@ -547,7 +548,7 @@ recover_cellular_checkpoint(Postgres& db, const FilesystemObjectStore& objects,
|
|||||||
if (!base)
|
if (!base)
|
||||||
return fail_with(RecoveryError::tail);
|
return fail_with(RecoveryError::tail);
|
||||||
auto batch_actions = server::decode_cellular_action_block(
|
auto batch_actions = server::decode_cellular_action_block(
|
||||||
**action_bytes, manifest->begin_tick, manifest->end_tick);
|
encoded_actions, manifest->begin_tick, manifest->end_tick);
|
||||||
if (!batch_actions ||
|
if (!batch_actions ||
|
||||||
!server::match_cellular_actions_to_trace(**base, *trace, *batch_actions))
|
!server::match_cellular_actions_to_trace(**base, *trace, *batch_actions))
|
||||||
return fail_with(RecoveryError::history);
|
return fail_with(RecoveryError::history);
|
||||||
|
|||||||
Reference in New Issue
Block a user