Join our Newsletter — 33% off our NHI Course
Home› FAQ› Cyber Security› How should teams log partial batch failures?
Cyber Security

How should teams log partial batch failures?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated November 25, 2026 Domain: Cyber Security

Log partial batch failures with one entry per record, including batch ID, record ID, status, error code, and retry count. Keep the batch as a whole marked complete only when the final record outcome is known, and preserve failed, skipped, and successful records separately so reconciliation and reprocessing are accurate.

What belongs in each log entry for a partial batch failure?

Partial batch failures need record-level logging, not just a batch-level status. Each entry should identify the batch, the individual record, the outcome, and the retry context so downstream systems can tell what succeeded, what failed, and what still needs action. That makes the log usable for audit, reconciliation, and reruns without guessing from a single aggregate result.

A useful pattern is to treat the batch as a container and each record as the auditable unit. If you only store one summary line, you lose the ability to trace mixed outcomes, which is the whole point of logging a partial failure.

Why record-level status matters for reconciliation and reruns

Partial failure handling is about preserving truth across three states: success, failure, and skip. When those outcomes are collapsed into one batch result, retry logic can double-process good records, skip failed ones indefinitely, or mark a job complete before all outcomes are known. Separate per-record entries keep reconciliation deterministic and let operators rebuild the exact state of the batch after interruption.

That distinction also matters when the same batch is replayed more than once. If the log does not preserve retry count and prior status, teams cannot tell whether a repeated record is a legitimate retry or a duplicate caused by an upstream resend. The log therefore becomes part of the control plane for replay safety, not just an audit trail.

How should teams structure batch completion and error handling?

The safest model is to mark the batch complete only when every record outcome is known, even if some records failed. That avoids a false sense of completion and prevents systems from treating a partially processed batch as finished work. The batch summary can show final completion, but the record log should remain the source of truth for which items were processed, skipped, or sent back for retry.

Teams should also make the error fields specific enough to support action. A generic failure flag tells you that something went wrong; an error code and retry count tell you whether the issue is transient, systematic, or exhausted. If the same failure pattern appears across many records, that is a signal to stop blind retries and investigate the upstream dependency or validation rule.

Risk and Threat Considerations

Partial batch logging failures create integrity and availability risk because the system may misstate what actually happened. If successful and failed records are not kept separate, operators can miss data loss, duplicate processing, or hidden replay loops, especially when retries are automated or batches are large.

Failure mechanism: Aggregated batch status hides per-record outcomes, so reconciliation logic cannot distinguish completed work from work that still needs retry or manual review.

Impact: Teams may commit incorrect downstream state, repeat actions on already-processed records, or lose the ability to prove which records were affected by an incident or restart.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5 and CIS Controls v8 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5AU-3 — Content of Audit RecordsPer-record batch logging needs sufficient event detail for reconciliation and review.
AU-12 — Audit Record GenerationPartial batch failures require generation of granular audit events for each record outcome.
AU-6 — Audit Record Review, Analysis, and ReportingSeparate success, failure, and skip states support review and incident reconstruction.
Recommendation — Record record ID, status, error code, and retry count in each audit entry. Generate an audit event for every record outcome, not just the batch summary. Review per-record outcomes to detect duplicates, retries, and incomplete processing.
CIS Controls v8CIS-8 — Audit Log ManagementBatch failure logging depends on retaining actionable event detail for investigation and recovery.
Recommendation — Centralise and retain per-record logs with outcome details for later analysis.
ISO/IEC 27001:2022A.8.15 — LoggingLogging controls apply because the question is about what to capture for recoverable batch processing.
Recommendation — Log each record outcome so processing state can be reconstructed accurately.

Practitioner Guidance

What to verify: Confirm that every record-level entry carries a stable batch ID, a unique record ID, and enough outcome detail to support replay without ambiguity. If the retry count is missing or inconsistent, the log is not fit for reprocessing decisions.

Common mistake: Do not rely on a single batch summary field as the authoritative record of processing. The summary is useful for operations, but the per-record trail is what prevents duplicate handling and missed recovery steps.

What good looks like: Operators can answer, from the log alone, which records succeeded, which failed, which were skipped, and which are pending another attempt, without inferring state from surrounding systems.

Practitioner takeaway: For partial batch failures, the log should describe state at the record level and completion at the batch level, because reconciliation depends on knowing both what happened and what still needs to happen.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org