Repository navigation
Description
Split out of #7306, which added VectorSearch, HybridSearch and FullTextSearch to arcadedb-server.proto alongside the matching HTTP routes.
The three new request messages carry database and credentials but no TransactionContext, unlike LookupByRidRequest, ExecuteQueryRequest and ExecuteCommandRequest. So a search issued while the client holds an open gRPC transaction runs outside it and cannot see that transaction's uncommitted writes.
The HTTP side does not have this gap. AbstractVectorSearchHandler extends DatabaseAbstractHandler, which runs the handler inside the session's transaction when the request carries arcadedb-session-id - so an HTTP client that opened a session and inserted a record can immediately find it through POST /api/v1/vector/{database}/search, and a gRPC client doing the equivalent cannot.
Shape of the fix
ArcadeDbGrpcService.lookupByRid is the pattern to follow: resolve the incoming transaction with resolveAuthorizedTransaction, reject an id the server no longer knows with unknownTransactionStatus, and run the body on the transaction's own thread through submitToActiveTransaction so the reads are tracked in that transaction. The three search handlers currently go straight to getDatabase(...) inside GrpcUnaryCall.respond.
That needs one new optional field on each of the three request messages:
TransactionContext transaction = 15; // VectorSearchRequest
TransactionContext transaction = 15; // HybridSearchRequest
TransactionContext transaction = 8; // FullTextSearchRequest
and the matching plumbing in RemoteGrpcDatabase.vectorSearch / hybridSearch / fullTextSearch, which today set only the database and credentials from the connection.
Verification
- A test that opens a gRPC transaction, inserts a vertex whose embedding is the exact query vector, and asserts the search finds it before the commit - which fails against the current code because the search runs outside the transaction.
- The same test over HTTP with a session id, asserting the two protocols agree, since that equivalence is what HTTP API has no streaming query and no vector search endpoint #7306 set out to establish.
Activity
feat(#7326): gRPC vector, hybrid and full-text search run inside the …
robfrank commentedon Sep 10, 2026
Fixed in #7397.
The three search RPCs added by #7306 carried
databaseandcredentialsbut noTransactionContext, so a search issued while the client held an open gRPC transaction ran on a gRPC worker thread instead of the transaction's own thread and could not see that transaction's uncommitted writes.VectorSearchRequest,HybridSearchRequestandFullTextSearchRequestnow carry an optionaltransaction, and the three handlers route through a shared helper that resolves it exactly aslookupByRidandupdateRecordalready do.RemoteGrpcDatabasestamps the open transaction on all three requests.Still open
TimeSeriesQueryandTimeSeriesLatesthave the identical missing-TransactionContextgap. Found by this issue's completeness sweep.fullTextSearchInsideATransactionFindsARecordCreatedInItnow asserts the verification you proposed on the path where it is achievable.httpAndGrpcAgreeOnARecordCreatedInsideTheTransactionpins the current behaviour on both protocols so it fails, and names the claim to revisit, whichever way Dense vector index search does not see rows created in the open transaction (full-text does) #7378 is resolved.❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
fix(ArcadeData#7715,ArcadeData#7714,ArcadeData#7712,ArcadeData#7711,A…