vectordotdev/vector · info
Event count for a record cannot exceed 2^64 events.
Error message
Event count for a record cannot exceed 2^64 events.
What it means
While scanning a data-file boundary in disk_v2 checkpoint recovery, each record's event count (stored as `usize`) is converted to `u64` so record IDs can advance correctly. The expect documents the invariant that an event count always fits in u64 on supported platforms. It cannot fire on 32/64-bit builds and indicates an internal bug or memory corruption if observed.
Source
Thrown at lib/vector-buffers/src/variants/disk_v2/checkpoint_recovery.rs:642
let id = token.record_id();
let bytes = token.record_bytes() as u64;
let record = match record_reader.read_record(token) {
Ok(record) => record,
Err(error) => {
warn!(
data_file_id = scan.file.id,
record_id = id,
record_bytes = bytes,
%error,
"Checkpoint record payload is undecodable; counting its bytes."
);
return CheckpointRecord::undecodable(id, bytes);
}
};
let events: u64 = record
.event_count()
.try_into()
.expect("Event count for a record cannot exceed 2^64 events.");
if events == 0 {
warn!(
data_file_id = scan.file.id,
record_id = id,
record_bytes = bytes,
"Checkpoint record payload is empty; counting its bytes."
);
return CheckpointRecord::undecodable(id, bytes);
}
let next_id = id + events;
let last_id = next_id - 1;
CheckpointRecord {
id,
bytes,
events: Some(events),
next_id: Some(next_id),View on GitHub (pinned to 3708c39b12)
Solutions
- Treat as a bug: capture the backtrace and report it upstream
- Check hardware/memory stability if panics recur
- Move the buffer data directory aside to restore service
Defensive patterns
Strategy: fallback
Prevention
- No caller-side guard exists; treat any occurrence as an upstream bug
- Maintain the ability to recreate the buffer data directory quickly to restore throughput
When it happens
Trigger: record.event_count() exceeding u64::MAX during a CheckpointBoundaryScan — impossible on 32/64-bit targets; no config, data, or environment state reaches it.
Common situations: None in practice; would only surface alongside memory corruption or an exotic custom platform.
Related errors
- record was already validated
- event count should never exceed u64
- a record with a next ID must have an event count
- Ledger length cannot be greater than `u64`.
- Default maximum data file size should never be greater than
AI-assisted analysis of vectordotdev/vector@3708c39b12 (2026-08-20).
Data as JSON: /api/errors/c204b190ed04ddf8.
Report an issue: GitHub.