JuliusBrussee/caveman · error

objectstore: page size must be positive

Error message

objectstore: page size must be positive

What it means

Error "objectstore: page size must be positive" thrown in JuliusBrussee/caveman.

Source

Thrown at shared/platform/objectstore/objectstore.go:75

type ObjectPage struct {
	Keys      []string
	NextToken string
	Truncated bool
}

// PagedLister is implemented by production backends and bounded test stores.
// A retention sweep must use this interface rather than materializing an
// unbounded Store.List result.
type PagedLister interface {
	ListPage(ctx context.Context, prefix, startAfter string, maxKeys int) (ObjectPage, error)
}

// ListPage dispatches to a cursor-capable backend. It intentionally does not
// fall back to Store.List: callers use it specifically to preserve a memory
// bound when a tenant prefix is large.
func ListPage(ctx context.Context, store Store, prefix, startAfter string, maxKeys int) (ObjectPage, error) {
	if maxKeys <= 0 {
		return ObjectPage{}, fmt.Errorf("objectstore: page size must be positive")
	}
	lister, ok := store.(PagedLister)
	if !ok {
		return ObjectPage{}, ErrPagingUnsupported
	}
	return lister.ListPage(ctx, prefix, startAfter, maxKeys)
}

// VersionPurger is implemented by version-aware backends. Explicit privacy
// deletion uses it to remove current objects, noncurrent versions, and delete
// markers immediately instead of waiting for lifecycle expiration.
type VersionPurger interface {
	DeleteAllVersions(ctx context.Context, key string) error
	DeletePrefixAllVersions(ctx context.Context, prefix string) error
}

// PurgeObject removes every version when supported, falling back to ordinary
// deletion only for non-versioned test/self-hosted backends.

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Set a positive page size.

When it happens

Trigger: Thrown at shared/platform/objectstore/objectstore.go:75 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/68d2b5ed974b4f8a. Report an issue: GitHub.