chroma-core/chroma · error · ChromaValueError

transactional get response did not include an OCC read token

Error message

transactional get response did not include an OCC read token

What it means

Guard in the conditional transaction: a filtered get response arrived without the OCC read token (log offset) that proves what snapshot was read; without it, optimistic-concurrency validation is impossible.

Solutions

  1. Retry the transaction with a server/client version pair that returns read tokens.
  2. Report a bug if the server should be returning a read token.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at clients/new-js/packages/chromadb/src/collection.ts:1630 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16). Data as JSON: /api/errors/baeb850d2205f845. Report an issue: GitHub.

Appendix: source

Thrown at clients/new-js/packages/chromadb/src/collection.ts:1630

        }
      }
      return;
    }

    const limit = request.limit ?? undefined;
    if (!Number.isInteger(limit) || (limit as number) <= 0) {
      throw new ChromaValueError(
        "transactional filter reads require a positive limit",
      );
    }
  }

  private validateReadToken(
    expectedReadToken: number | null,
    actualReadToken: number | null | undefined,
  ): void {
    if (actualReadToken === null || actualReadToken === undefined) {
      throw new ChromaValueError(
        "transactional get response did not include an OCC read token",
      );
    }
    if (!Number.isSafeInteger(actualReadToken) || actualReadToken < 0) {
      throw new ChromaValueError(
        `transactional read token offset ${actualReadToken} is not a safe integer`,
      );
    }
    if (expectedReadToken !== null && expectedReadToken !== actualReadToken) {
      throw new ChromaValueError(
        "transactional read token changed from log upper bound offset " +
          `${expectedReadToken} to ${actualReadToken}`,
      );
    }
    if (this.readToken !== null && this.readToken !== actualReadToken) {
      throw new ChromaValueError(
        "transactional read token changed from log upper bound offset " +
          `${this.readToken} to ${actualReadToken}`,

View on GitHub (pinned to aecdd12c8a)