Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
graphd adds a
StreamingExecuteRPC that returns a query result as a stream of messages: one header (metadata), any number ofbatchmessages, and onefinalcarrying the status, summary and cursor (https://github.com/vesoft-inc/nebula-ng/pull/11432).Executestill returns the whole result in one message, so the client must receive and decode it completely before the first row is readable.This PR adds forward-only streaming results to the Go client without changing
types.Clientortypes.Result, so existing application mocks keep compiling:The clients returned by the SDK implement
StreamingClient; callers obtain it through a type assertion.Reading model
StreamingExecutereturns after the first response message, so statement errors and column names are available at the call site, as withExecute.finalfollowed by a normal end of stream. A missingfinal, a message afterfinal, a header with result totals, or an empty batch is reported throughErr().RowSize()returns-1: the total is unknown while streaming.Connection rules
Execute,Pingand anotherStreamingExecuteon that client return an error, and the pool refuses to take the client back.Close()cancels only this RPC and returns without waiting for the server to stop the query. It may be called more than once and from another goroutine to interrupt a blocked read.StreamingExecuteuses only the caller'sctx; its deadline covers the whole iteration, including the time spent processing rows. A transport error is not retried, because the statement may already have run.Released graphd versions declare
StreamingExecutebut do not handle it, so calling them waits instead of failing withUNIMPLEMENTED; there is no version negotiation. Usage is documented indocs/streaming.md.Only
graph.pb.goandgraph_grpc.pb.goare regenerated for the new messages;vector.protois unchanged.