Skip to content

A time-series read naming an expired transaction is refused on gRPC and silently degraded on HTTP #7685

Closed as not planned

Description

@robfrank

Found by the completeness sweep of #7402, and it is the same shape of asymmetry that produced #7402 itself.

#7370 made the two time-series READ RPCs refuse a transaction id the server cannot resolve:

// ArcadeDbGrpcService.timeSeriesQuery / timeSeriesLatest
if (isUnknownSuppliedTransaction(incomingTxId, txCtx))
  throw unknownTransactionStatus(incomingTxId).asRuntimeException();   // FAILED_PRECONDITION

Issue7370GrpcTimeSeriesInTransactionIT.aTimeSeriesQueryNamingAnUnknownTransactionIsRejected pins that, and its javadoc calls the silent fall-through "the observable defect".

#7402 brought the HTTP twins onto DatabaseAbstractHandler and answered the same question the other way: POST /api/v1/ts/{db}/query and GET /api/v1/ts/{db}/latest override requiresTransaction() to false, so an arcadedb-session-id that no longer resolves degrades to a session-less read and answers 200. Issue7402TimeSeriesHttpSessionIT.aTimeSeriesReadNamingAnUnknownSessionStillAnswers pins it, and TimeSeriesApiSpec documents it.

Both choices were made on purpose and each is defensible in its own protocol:

  • HTTP follows GET /api/v1/query, whose stale-session degrade keeps read-after-commit and idempotent retries working. DatabaseAbstractHandler.setTransactionInThreadLocal names read-only handlers as the degrading case in so many words.
  • gRPC follows lookupByRid, updateRecord and the three search RPCs of gRPC vector search RPCs cannot run inside a client transaction #7326, which all answer FAILED_PRECONDITION.

The result is that the same application, doing the same thing over the two protocols, gets two different answers to "I read with a transaction id that had expired": gRPC tells it, HTTP does not. That is precisely the cross-protocol divergence #7305 set out to avoid and #7370/#7402 each noticed from one side.

What has to be decided

Not "which handler is wrong" but which contract the product wants for a READ naming a transaction that is gone:

  1. Refuse on both. A read inside a transaction the caller no longer has is a caller bug; saying so is cheap and the client can re-open. Cost: HTTP clients that retry a read after a commit, which today succeed, start getting 404 - a real compatibility break, and the reason GET /query degrades in the first place.
  2. Degrade on both. Cheap for clients, and consistent with GET /query. Cost: reverts part of gRPC TimeSeriesQuery and TimeSeriesLatest cannot run inside a client transaction #7370 and loses the signal its javadoc argues for.
  3. Keep both and document the split as a deliberate protocol difference, in the OpenAPI operation and in the proto comments, so it is a contract rather than an accident.

Option 3 is the status quo plus honesty and is the cheapest; options 1 and 2 need a deprecation story. Whichever is chosen, the two pinning tests above are where it has to be recorded, because each currently asserts its own side.

Writes are NOT part of this question: both protocols already refuse. HTTP does it through PostTimeSeriesWriteHandler.rejectsUnresolvableSession() (#7402), gRPC through the same isUnknownSuppliedTransaction gate.

Activity

  1. added
    grpc
    server
    timeseries
    on Sep 16, 2026
  2. added this to the 26.10.1 milestone on Sep 16, 2026
  3. self-assigned this
    on Sep 16, 2026
  4. robfrank commented on Sep 16, 2026

    @robfrank
    CollaboratorAuthor

    Merged into #7675, which now carries the consolidated scope.

    Same class of defect: gRPC refuses, HTTP silently degrades to a non-transactional read. It is now a row in #7675's contract table, alongside the non-positive bucketInterval, the empty requests array and the unresolvable fields projection - and, like the projection, it is one of the rows where the silent path can return wrong data, not merely a wrong status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buggrpcservertimeseries

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions