weaviate/weaviate · error

store secondary bloom filter on disk: %w

Error message

store secondary bloom filter on disk: %w

What it means

Wraps storeBloomFilterSecondaryOnDisk failures after computing a secondary-index bloom filter. The filter was built in memory from the secondary index's keys but persisting it via writeWithChecksum failed — disk-level cause (space, permissions, I/O).

Source

Thrown at adapters/repos/db/lsmkv/segment_bloom_filters.go:209

	s.logger.WithField("action", "lsm_init_disk_segment_build_bloom_filter_secondary").
		WithField("secondary_index_position", pos).
		WithField("path", s.path).
		WithField("took", took).
		Debugf("building bloom filter took %s\n", took)

	return nil
}

func (s *segment) computeAndStoreSecondaryBloomFilter(path string, pos int) error {
	count := s.secondaryIndices[pos].KeyCount()
	s.secondaryBloomFilters[pos] = bloom.NewWithEstimates(uint(count), 0.001)
	s.secondaryIndices[pos].ForEachKey(func(key []byte) {
		s.secondaryBloomFilters[pos].Add(key)
	})

	if err := s.storeBloomFilterSecondaryOnDisk(path, pos); err != nil {
		return fmt.Errorf("store secondary bloom filter on disk: %w", err)
	}

	return nil
}

func (s *segment) storeBloomFilterSecondaryOnDisk(path string, pos int) error {
	bfSize := getBloomFilterSize(s.bloomFilter)

	rw := byteops.NewReadWriter(make([]byte, bfSize+byteops.Uint32Len))
	rw.MoveBufferPositionForward(byteops.Uint32Len) // leave space for checksum
	_, err := s.secondaryBloomFilters[pos].WriteTo(&rw)
	if err != nil {
		return fmt.Errorf("write bloom filter: %w", err)
	}

	return writeWithChecksum(rw, path, s.observeMetaWrite)
}

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Free disk space on the data volume.
  2. Check write permissions on the shard directory.
  3. Inspect host storage logs for hardware/device I/O errors.
  4. Restart Weaviate — the secondary bloom filter is recomputed from the secondary index.
Defensive patterns

Strategy: validation

Validate before calling

// check free space and writability before starting shards with secondary indexes
st, err := syscall.Statfs(dataDir)
if err == nil && uint64(st.Bavail)*uint64(st.Bsize) < minFreeBytes {
    return fmt.Errorf("low disk space for bloom sidecars")
}

Prevention

When it happens

Trigger: computeAndStoreSecondaryBloomFilter during segment init when the .secondary.<pos>.bloom sidecar is missing or failed checksum load, and the subsequent os.Create/write fails (ENOSPC, EACCES, EIO).

Common situations: Disk full on shards with secondary indexes (e.g. tenant/partition properties); read-only or quota-limited volume; directory removed while the process runs.

Related errors


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