Fix optional access in cellular checkpoint recovery
Foundation / checks (deploy) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 1m49s
Foundation / checks (client) (push) Successful in 13m34s
Foundation / checks (network) (push) Successful in 14m53s
Foundation / checks (tsan) (push) Successful in 8m27s
Foundation / checks (postgres) (push) Failing after 19m52s
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 34m54s
Foundation / checks (deploy) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 1m49s
Foundation / checks (client) (push) Successful in 13m34s
Foundation / checks (network) (push) Successful in 14m53s
Foundation / checks (tsan) (push) Successful in 8m27s
Foundation / checks (postgres) (push) Failing after 19m52s
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 34m54s
This commit is contained in:
@@ -6900,3 +6900,10 @@ unchecked nested optional read at `tests/cellular_lives_tests.cpp:289`. The earn
|
|||||||
mutation offer is now copied through a safe default after the assertion still
|
mutation offer is now copied through a safe default after the assertion still
|
||||||
checks the offer has candidates. Its check suite failed, so the dependent server
|
checks the offer has candidates. Its check suite failed, so the dependent server
|
||||||
image did not start; rerun is needed to reach Harbor publication.
|
image did not start; rerun is needed to reach Harbor publication.
|
||||||
|
|
||||||
|
CI run #288 found another unchecked optional access in cellular checkpoint
|
||||||
|
recovery at `src/persistence/cellular_checkpoint_store.cpp:568` while building
|
||||||
|
the PostgreSQL-enabled analysis target. Recovery now copies the optional record,
|
||||||
|
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
|
||||||
|
dependent server-image build and Harbor publication did not start.
|
||||||
|
|||||||
@@ -563,9 +563,10 @@ recover_cellular_checkpoint(Postgres& db, const FilesystemObjectStore& objects,
|
|||||||
if (!records)
|
if (!records)
|
||||||
return std::unexpected{RecoveryFailure{RecoveryError::store, records.error()}};
|
return std::unexpected{RecoveryFailure{RecoveryError::store, records.error()}};
|
||||||
for (std::size_t i = 0; i < batch_actions->size(); ++i) {
|
for (std::size_t i = 0; i < batch_actions->size(); ++i) {
|
||||||
if (!(*records)[i])
|
const auto found_record = (*records)[i];
|
||||||
|
if (!found_record)
|
||||||
return fail_with(RecoveryError::history);
|
return fail_with(RecoveryError::history);
|
||||||
const auto& record = *(*records)[i];
|
const auto record = found_record.value_or(CommittedActionRecord{});
|
||||||
const auto& action = (*batch_actions)[i];
|
const auto& action = (*batch_actions)[i];
|
||||||
if (record.kind != 2 || record.result != 5 || !record.cellular_input ||
|
if (record.kind != 2 || record.result != 5 || !record.cellular_input ||
|
||||||
*record.cellular_input !=
|
*record.cellular_input !=
|
||||||
|
|||||||
Reference in New Issue
Block a user