juicedata/juicefs · error

the downloaded content is incorrect

Error message

the downloaded content is incorrect

What it means

Returned by objbench's getAndCheckN verification when the downloaded object does not match the expected generated content: either the length differs or the first checked bytes deviate from the deterministic mock data. It flags data corruption or wrong reads in the benchmark path.

Source

Thrown at cmd/objbench.go:626

	checkN := 10
	l := len(seed)
	if l < checkN {
		checkN = l
	}

	// if orgIdx is 0, mockdata is the same as the seed
	var preNMockData []byte
	if orgIdx == 0 {
		preNMockData = seed[:checkN]
	} else {
		mockResult := pool.Get().(*[]byte)
		defer pool.Put(mockResult)
		preNMockData = (*mockResult)[:checkN]
		getMockData(seed, orgIdx, &preNMockData)
	}

	if n != len(seed) || !bytes.Equal((*content)[:checkN], preNMockData) {
		return fmt.Errorf("the downloaded content is incorrect")
	}
	return nil
}

func (bm *benchMarkObj) get(ctx context.Context, key string, startKey int) error {
	return getAndCheckN(ctx, bm.blob, key, bm.seed, bm.buffPool, func(idx int) int {
		return idx - startKey
	})
}

func (bm *benchMarkObj) smallGet(ctx context.Context, key string, startKey int) error {
	return getAndCheckN(ctx, bm.blob, key, bm.smallSeed, bm.smallBuffPool, func(idx int) int {
		return idx
	})
}

func (bm *benchMarkObj) delete(ctx context.Context, key string, startKey int) error {
	return bm.blob.Delete(ctx, key)

View on GitHub (pinned to c9a67b23e8)

Solutions

  1. Re-run objbench to see if corruption is reproducible
  2. Inspect the backend for checksum/encryption proxying that could alter object data
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cmd/objbench.go:626 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06). Data as JSON: /api/errors/2f3bb9555c5e51ef. Report an issue: GitHub.