weaviate/weaviate · error

failed to put empty posting %d after split operation

Error message

failed to put empty posting %d after split operation

What it means

HFresh wraps the error from PostingStore.Put when writing the now-empty old posting (to bump its version and allow cleanup of old vectors on disk). Failure aborts doSplit after the centroid updates; the split is retried by the caller.

Source

Thrown at adapters/repos/db/vector/hfresh/split.go:176

			return errors.Wrapf(err, "failed to upsert new centroid %d after split operation", newPostingID)
		}
	}

	// delete the old centroid
	err = h.Centroids.MarkAsDeleted(postingID)
	if err != nil {
		return errors.Wrapf(err, "failed to delete old centroid %d after split operation", postingID)
	}
	err = h.setPostingVectorIDs(ctx, postingID, Posting{})
	if err != nil {
		return errors.Wrapf(err, "failed to set posting size for posting %d after split operation", postingID)
	}

	// put empty posting for postingID to increase version and
	// allow cleanup of old vectors on disk
	err = h.PostingStore.Put(ctx, postingID, Posting{})
	if err != nil {
		return errors.Wrapf(err, "failed to put empty posting %d after split operation", postingID)
	}

	// Mark the split operation as done
	markedAsDone = true
	h.postingLocks.Unlock(postingID)
	h.taskQueue.SplitDone(postingID)

	if !reassign {
		return nil
	}

	err = h.enqueueReassignAfterSplit(ctx, postingID, newPostingIDs, result)
	if err != nil {
		return errors.Wrapf(err, "failed to enqueue reassign after split for posting %d", postingID)
	}

	return nil
}

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Fix the underlying storage error reported in the wrapped cause
  2. Check and free disk space on the node
  3. Restart the shard so the split retry succeeds
  4. If errors persist, inspect/repair the LSM store for the affected shard
Defensive patterns

Strategy: retry

Validate before calling

// pre-check: writable disk with sufficient space
// e.g. run 'df' monitoring and alert below a threshold before large imports

Try / catch

if err := op(); err != nil {
	if strings.Contains(err.Error(), "failed to put empty posting") {
		return retry()
	}
	return err
}

Prevention

When it happens

Trigger: PostingStore.Put(ctx, postingID, Posting{}) errors while finalizing a split from append or Execute — disk full, store closed/corrupted, or context cancellation.

Common situations: Disk exhaustion during large imports; I/O errors on the data volume; shard shutdown racing background splits; corrupted posting store after crash.

Related errors


AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04). Data as JSON: /api/errors/391a003f52280c3d. Report an issue: GitHub.