weaviate/weaviate · error
remove original file
Error message
remove original file
What it means
Deleting the original raw/condensed commit log file after its sorted replacement was committed failed in removeConvertedSource. Only ENOENT is tolerated (someone else already removed it); any other Remove error — permissions or EIO — is surfaced. Because the sorted replacement is durable, a lingering original is merely redundant: overlap resolution deletes it on a later cycle.
Source
Thrown at adapters/repos/db/vector/hnsw/compact/compactor.go:374
return false, errors.Wrap(err, "write sorted file")
}
if err := sfw.Commit(); err != nil {
return false, errors.Wrap(err, "commit sorted file")
}
c.logger.WithFields(logrus.Fields{
"action": "hnsw_compactor_convert",
"original": filepath.Base(f.Path),
"output": outFilename,
}).Debug("converted file to sorted format")
return inMemReader.HasReset(), nil
}
func (c *Compactor) removeConvertedSource(f FileInfo) error {
if err := c.fs.Remove(f.Path); err != nil && !os.IsNotExist(err) {
return errors.Wrap(err, "remove original file")
}
return nil
}
// decideAction determines what compaction action to take based on current state.
func (c *Compactor) decideAction(state *DirectoryState) Action {
snapshotSize := state.TotalSnapshotSize()
sortedSize := state.TotalSortedSize()
totalSize := snapshotSize + sortedSize
sortedCount := len(state.SortedFiles)
log := c.logger.WithFields(logrus.Fields{
"action": "hnsw_compactor_decide",
"snapshot_size": snapshotSize,
"sorted_size": sortedSize,
"sorted_count": sortedCount,
"has_snapshot": state.Snapshot != nil,
"threshold": c.config.SnapshotThreshold,View on GitHub (pinned to 75aa4b6d11)
Solutions
- Rely on the next cycle's overlap resolution, which deletes the contained redundant file automatically
- Fix directory permissions if Remove keeps failing
- Delete the stale file manually once Weaviate is not writing to it
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at adapters/repos/db/vector/hnsw/compact/compactor.go:374 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/e6edf28bbea199aa.
Report an issue: GitHub.