weaviate/weaviate · error
read digest in range record: %w
Error message
read digest in range record: %w
What it means
Wraps io.ReadFull failure while streaming fixed-size digest records from the binary response body in readDigestsInRangeBinaryStream. EOF terminates the stream cleanly; any other error (unexpected EOF, connection reset, read timeout) means the peer's binary payload was truncated or the connection broke mid-stream. Pre-sizing is clamped to the request's own bound precisely so this path cannot over-allocate from a peer-controlled Content-Length.
Source
Thrown at adapters/clients/replication.go:209
// Content-Length is peer-controlled; never pre-size beyond the request's own bound
recordCount := contentLength / int64(replica.DigestObjectsInRangeRecordLength)
if recordCount > int64(maxRecords) {
recordCount = int64(maxRecords)
}
// a caller-supplied negative bound must not reach make
if recordCount < 0 {
recordCount = 0
}
results = make([]types.RepairDigest, 0, int(recordCount))
}
var buf [replica.DigestObjectsInRangeRecordLength]byte
for {
_, err := io.ReadFull(r, buf[:])
if stderrors.Is(err, io.EOF) {
return results, nil
}
if err != nil {
return nil, fmt.Errorf("read digest in range record: %w", err)
}
id, err := uuid.FromBytes(buf[:16])
if err != nil {
return nil, fmt.Errorf("parse uuid from binary record: %w", err)
}
updateTime := int64(binary.BigEndian.Uint64(buf[16:]))
results = append(results, types.RepairDigest{
ID: id,
UpdateTime: updateTime,
})
}
}
// CompareDigests sends the source's local digests to the target node using a
// compact binary protocol (CompareDigestsRecordLength bytes per record) and
// returns the subset that requires source-side action.
//
// Wire format: CompareDigestsRecordLength bytes per record —View on GitHub (pinned to 75aa4b6d11)
Solutions
- 重试摘要请求(异步复制调度程序将在下一个 tick 重试完整周期)。
- 检查两个节点之间的网络稳定性(数据包丢失、代理、超时)。
- 检查目标节点日志,查看在流式传输期间是否崩溃或重启。
Defensive patterns
Strategy: retry
Try / catch
digests, err := client.DigestObjectsInRange(ctx, host, index, shard, ...)
if err != nil {
if strings.Contains(err.Error(), "read digest in range record") {
// stream interrupted — retry full request
}
return err
} Prevention
- 确保网络稳定,避免在节点之间设置激进的空闲超时或代理。
- 在流式传输时避免在目标节点上进行重量级的维护操作(重启/升级)。
- 使用 context deadlines 来防止无限挂起。
When it happens
Trigger: 网络中断,连接在传输中途被重置,或在流式传输二进制响应体时超时。
Common situations: 目标节点与该节点之间的网络不稳定,目标节点在流式传输时崩溃/重启,或代理截断连接。
Related errors
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/87deae7b6345655f.
Report an issue: GitHub.