weaviate/weaviate · error

check insert/update status

Error message

check insert/update status

What it means

Wrapper around s.determineInsertStatus(prevObj, obj) in mergeObjectInStorage. determineInsertStatus compares the previous and merged object to decide whether the doc ID must be bumped, whether the object changed at all (skipUpsert), and to assign the new DocID. A failure means the shard could not compute the insert/update status for the merged object.

Source

Thrown at adapters/repos/db/shard_write_merge.go:186

			return errors.Wrap(err, "get bucket")
		}

		if prevObj == nil {
			return errObjectNotFound
		}

		obj, _, err = s.mergeObjectData(prevObj, merge)
		if err != nil {
			return errors.Wrap(err, "merge object data")
		}

		// A property-only merge carries the previous version's vectors forward;
		// a dropped one must not be re-persisted into a new segment.
		stripDroppedVectors(class, obj)

		status, err = s.determineInsertStatus(prevObj, obj)
		if err != nil {
			return errors.Wrap(err, "check insert/update status")
		}

		obj.DocID = status.docID
		if status.skipUpsert {
			return nil
		}

		objBytes, err := obj.MarshalBinaryDisk(s.index.Config.SkipWriteClassNameOnDisk)
		if err != nil {
			return errors.Wrapf(err, "marshal object %s to binary", obj.ID())
		}

		if err := s.upsertObjectDataLSM(bucket, idBytes, objBytes, status.docID); err != nil {
			return errors.Wrap(err, "upsert object data")
		}

		// Tee before hashtree: the bucket is the SSOT for movement catchup.
		// This path does NOT funnel through putObjectLSM, so it needs its own tee.

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Inspect the inner error to identify why status determination failed
  2. Confirm the object is consistent with a GET; re-create the object if it appears torn
  3. Retry the merge; transient LSM state usually resolves after a flush
  4. If reproducible, report/upgrade — this indicates internal state the API user cannot fix directly
Defensive patterns

Strategy: retry

Validate before calling

// ensure the object is stable/readable before merging
if _, err := fetchObjectBytID(ctx, class, id); err != nil {
    return fmt.Errorf("object %s not readable, abort merge: %v", id, err)
}

Try / catch

err := mergeObject(ctx, class, id, patch)
if err != nil && strings.Contains(err.Error(), "check insert/update status") {
    // transient internal state: retry once after a short delay
    time.Sleep(500 * time.Millisecond)
    err = mergeObject(ctx, class, id, patch)
}
return err

Prevention

When it happens

Trigger: PATCH merge of an existing object where the status computation (doc-ID allocation / change detection between previous and next object) returns an error, e.g. inconsistencies in the stored object that defeat the before/after comparison.

Common situations: Data inconsistency after failed writes or crashes mid-segment-flush; objects imported through replication paths with mismatched doc IDs.

Related errors


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