SessionService
Multiplexed bidirectional session.
One long-lived bidirectional stream carries many concurrent operations for a single client. The client fires a batch of requests into the stream; the server executes them concurrently and streams results back as independent cursors, tagged by request id, in completion order rather than send order. An interactive transaction rides the same session as one interleaved sub-thread alongside non-transactional requests, and change-stream subscriptions ride it too, delivered in batches within the credit the client grants. The session is sticky to the serving node for its lifetime. Interactive transactions run only here: one stream delivers a transaction's commands in the order they were sent, which separate unary calls cannot. The unary query and change-stream RPCs remain for clients that cannot hold a stream.
Proto source
Methods
Session
Open a session. The client sends a stream of ClientFrames (queries and transaction-control operations); the server returns a stream of ServerFrames (cursor chunks and transaction acknowledgements), each tagged with the originating request_id so responses demultiplex out of order.
Transport: Server-streaming gRPC only (no HTTP transcoding)
Request: stream ClientFrame
| Field | Type | Description |
|---|---|---|
request_id | uint64 | Client-assigned, session-scoped correlation id. Every ServerFrame produced for this operation carries the same request_id, so a client demultiplexes concurrent responses and cursor chunks that arrive out of order. The client is responsible for keeping request_ids unique within a live session. |
execute | Execute | Run a query statement (autonomous or inside a transaction). |
begin | Begin | Open an interactive transaction under the ID the client drew, with the transaction settings this session has in effect. Nothing answers a Begin that succeeds: the client sends the transaction's statements right after it. A refused Begin is answered with a SessionError. |
commit | Commit | Commit an interactive transaction by its ID. |
rollback | Rollback | Roll back an interactive transaction by its ID. |
cancel | Cancel | Abort an in-flight request and close its cursor. |
configure | Configure | Read, and optionally change, this connection's settings. Answered with a ConnectionStatus carrying the settings now in effect. |
subscribe | Subscribe | Open a change-stream subscription on this session. Answered with Subscribed, then with ChangeEventBatch frames on this request_id as far as the credit granted reaches. |
credit | Credit | Grant a subscription of this session credit for more events. |
acknowledge | AcknowledgeSubscriptionRequest | Acknowledge a subscription's events, with the same meaning as the change-stream service's AcknowledgeSubscription. Answered with Acknowledged. |
cancel_subscription | CancelSubscriptionRequest | End a consumer's registration, with the same meaning as the change-stream service's CancelSubscription. Answered with SubscriptionCancelled; an open subscription of that incarnation on this session then ends with a CONSUMER_TERMINATED error. |
Response: stream ServerFrame
| Field | Type | Description |
|---|---|---|
request_id | uint64 | request_id of the ClientFrame this event answers. |
cursor_open | CursorOpen | Opens a cursor for a query, carrying the column header. |
rows | RowBatch | A batch of result rows for an open cursor; many may arrive per request. |
cursor_end | CursorEnd | Closes a cursor, carrying final query statistics. |
committed | Committed | Acknowledges Commit, carrying the causal applied-index token. |
error | SessionError | Reports an error for the request; terminates its cursor. |
connection_status | ConnectionStatus | The state of this connection: whether it can serve writes, what it can see of the cluster, and the settings in effect. Sent in answer to a Configure, and unsolicited whenever the state changes. |
subscribed | Subscribed | Acknowledges Subscribe, carrying the registration's incarnation. |
change_events | ChangeEventBatch | Units of a subscription, in log order, from at most the credit left of log entries. |
acknowledged | Acknowledged | Acknowledges an acknowledge frame. |
subscription_cancelled | SubscriptionCancelled | Acknowledges a cancel_subscription frame. |
Types
AcknowledgeSubscriptionRequest
| Field | Type | Description |
|---|---|---|
consumer_id | string | The consumer acknowledging. |
incarnation | uint64 | Its incarnation, from the Subscribe response metadata. |
cursor | bytes | The cursor of the last batch the client no longer needs the source for: it holds the units durably, or it has durably taken their effect into the state it keeps. Everything before it is acknowledged: the server may release that source for this consumer, and a resume without a cursor continues from it. |
Acknowledged
Acknowledges an acknowledge frame: the registration now holds the history from that position on only.
No fields.
ArrayType
A homogeneous array type.
| Field | Type | Description |
|---|---|---|
element | PropertyType | The type of every element. Required. |
Begin
Open an interactive transaction. Its read and write concern and its timeout outcome are the session's settings in effect when the Begin arrives (Configure), over the server's defaults.
| Field | Type | Description |
|---|---|---|
txid | bytes | The transaction's ID: a random UUID (version 4, 16 bytes) the client draws, sent again on its Execute, Commit and Rollback frames. It names no member or term; any member passes the transaction's commands on to the leader. An ID already open is refused with ALREADY_EXISTS, reason TRANSACTION_ID_IN_USE; one that is not 16 bytes with INVALID_ARGUMENT. |
operation | OperationRef | The client operation the transaction carries out, which its commit binds. Required when the transaction's timeout outcome is TIMEOUT_OUTCOME_COMMIT, so that the client can resolve a commit made at idle expiry; a Begin without one is then refused with INVALID_ARGUMENT, reason OPERATION_REQUIRED. Optional otherwise. A Commit naming another operation is refused with INVALID_ARGUMENT. |
Cancel
Abort an in-flight request and close its cursor.
| Field | Type | Description |
|---|---|---|
target_request_id | uint64 | request_id of the in-flight request to abort. |
CancelSubscriptionRequest
| Field | Type | Description |
|---|---|---|
consumer_id | string | The consumer to cancel. |
incarnation | uint64 | The incarnation to cancel, from the Subscribe response metadata. A different incarnation of the same id is left alone. |
CausalReceipt
What a completed statement tells its caller for later causal reads. A causal session keeps the largest operation_time it has received and passes it as ReadConcern.after_ts.
| Field | Type | Description |
|---|---|---|
operation_time | uint64 | For a write, the commit timestamp of its own writes; for a read, the timestamp its view was taken at: every commit at or below it that was visible to the read. HLC microseconds. Zero when the statement has none: a write answered before it committed (a volatile journal level, or acks: 0), which gives no causal dependency to wait for. |
position | HistoryPosition | Where the write's own entry is in its history's log. Absent for a read, and outside a replicated group. |
ChangeBatch
Units read from the log, and where the stream continues after them.
| Field | Type | Description |
|---|---|---|
units | ChangeUnit[] | The units, in log order. Empty for a batch whose entries carried no unit; the batch still moves cursor. The first may continue a unit an earlier batch began, and the last may stop inside one, which the next batch continues: a transaction with more events than one batch holds arrives in fragments. |
cursor | bytes | Where the stream continues after this batch: pass it on reconnect to resume here, and to AcknowledgeSubscription once the units are held. Opaque; it binds the history, the event interpretation and the interest. |
ChangeEventBatch
Units of one subscription, oldest first, from as many log entries as were ready and the credit allowed.
| Field | Type | Description |
|---|---|---|
batch | ChangeBatch | The units and the cursor after them, as the change-stream service sends them. |
more | bool | True when entries the serving node had already applied were waiting past this batch when it was cut, because the credit ran out: granting more credit delivers them at once. False when the batch reached everything applied, so further events come as the node applies them. |
entries | uint32 | The log entries the batch passed: the credit it used. |
ChangeInterest
What a subscription follows. Absent labels follows the nodes of every label; present and empty follows none. The same for edge_types.
| Field | Type | Description |
|---|---|---|
labels | NameList | Labels whose nodes the subscription follows: a node event reaches it when the node carries one of them before or after the event, its type's implied labels included. A name is bound to the label it names when the subscription opens; one not bound is refused with INVALID_ARGUMENT. |
edge_types | NameList | Relationship types whose relationships the subscription follows, by name. |
blobs | bool | Whether the subscription follows blob objects: what each owner (a stored object, an S3 object, a node's large property) holds, put and removed. They belong to no label. |
ChangeUnit
One committed transaction, or a fragment of one: the events of it in the ordinal range [first_ordinal, end_ordinal) the subscription takes.
| Field | Type | Description |
|---|---|---|
commit_ts | uint64 | HLC commit timestamp of the transaction, in wall-clock microseconds since the Unix epoch with logical increments inside one microsecond. |
log_index | uint64 | The Raft log index of the entry carrying it. |
unit | uint32 | Its place among the transactions of that entry. |
projected | uint32 | How many events the transaction has in all, taken by the subscription or not: with the ordinals of the events received, the client tells it received every event of it its interest takes. |
events | LogicalChange[] | The events the subscription takes, in ordinal order. |
first_ordinal | uint32 | The first ordinal this delivery covers: zero unless an earlier batch delivered the transaction's start. |
end_ordinal | uint32 | The ordinal after the last one this delivery covers, taken by the subscription or not: equal to projected when the delivery reaches the transaction's end. A transaction is complete once its deliveries cover [0, projected). |
ClientFrame
One operation sent by the client on the session stream.
| Field | Type | Description |
|---|---|---|
request_id | uint64 | Client-assigned, session-scoped correlation id. Every ServerFrame produced for this operation carries the same request_id, so a client demultiplexes concurrent responses and cursor chunks that arrive out of order. The client is responsible for keeping request_ids unique within a live session. |
execute | Execute | Run a query statement (autonomous or inside a transaction). |
begin | Begin | Open an interactive transaction under the ID the client drew, with the transaction settings this session has in effect. Nothing answers a Begin that succeeds: the client sends the transaction's statements right after it. A refused Begin is answered with a SessionError. |
commit | Commit | Commit an interactive transaction by its ID. |
rollback | Rollback | Roll back an interactive transaction by its ID. |
cancel | Cancel | Abort an in-flight request and close its cursor. |
configure | Configure | Read, and optionally change, this connection's settings. Answered with a ConnectionStatus carrying the settings now in effect. |
subscribe | Subscribe | Open a change-stream subscription on this session. Answered with Subscribed, then with ChangeEventBatch frames on this request_id as far as the credit granted reaches. |
credit | Credit | Grant a subscription of this session credit for more events. |
acknowledge | AcknowledgeSubscriptionRequest | Acknowledge a subscription's events, with the same meaning as the change-stream service's AcknowledgeSubscription. Answered with Acknowledged. |
cancel_subscription | CancelSubscriptionRequest | End a consumer's registration, with the same meaning as the change-stream service's CancelSubscription. Answered with SubscriptionCancelled; an open subscription of that incarnation on this session then ends with a CONSUMER_TERMINATED error. |
Commit
Commit an interactive transaction once every command the stream sent for it before has run.
| Field | Type | Description |
|---|---|---|
txid | bytes | The transaction to commit, the ID its Begin carried. |
operation | OperationRef | The client operation the transaction carries out, allocated before the Commit is sent. Its writes take effect at most once: after a lost reply the client resolves the same operation (OperationService.ResolveOperation) on any connection, and a repeated commit of it runs nothing again. Absent commits under the operation the Begin named, or unbound. |
expect | ExpectedNodeVersion[] | Commit only while these nodes are still at these versions. An empty list is the ordinary unconditional commit. The condition is checked when the transaction commits, against the state at that moment, so it protects the window between the read the caller built on and the write it is making. A mismatch refuses the whole transaction with ABORTED and reason REVISION_MISMATCH, carrying expected_version and current_version in the error metadata: the caller decides what to do next from those rather than reading the node again and racing a second time. |
Committed
Acknowledges Commit.
| Field | Type | Description |
|---|---|---|
commit_ts | uint64 | HLC commit timestamp (microseconds since the Unix epoch) every mutation of the transaction was applied at. Server-assigned. Equal to the storage sequence number of the write, so it is the exact snapshot anchor: AS OF TIMESTAMP <commit_ts> sees this transaction and nothing committed later; a change-stream consumer that has processed it resumes from commit_ts + 1. Present in every mode; a read-only transaction reports its pinned read timestamp. It is the transaction's causal operation time: a causal session folds it into the after_ts of what follows. |
position | HistoryPosition | Where the commit's entry is in its history's log, for a causal read bounded by ReadConcern.after_position. Absent outside a replicated group and for a transaction that wrote nothing. |
ComputedPropertyDefinition
A COMPUTED property of a label: evaluated from each node's data, stored once in the label definition and never per node. Read-only; a write to it is refused.
| Field | Type | Description |
|---|---|---|
name | string | Property name, unique within the label and distinct from every stored property name. |
computed_type | ComputedType | Kind of computed property. Required. |
formula_type | DecayFormulaType | Decay formula, for DECAY and VECTOR_DECAY. Ignored for TTL. |
lambda | double | EXPONENTIAL rate, lambda = ln(2) / half_life_fraction, where half_life_fraction is the half-life as a fraction of duration_secs. |
tau | double | POWER_LAW time scale as a fraction of the duration, greater than 0. |
alpha | double | POWER_LAW exponent, greater than 0. |
initial | double | DECAY value at elapsed = 0. |
target | double | DECAY value once elapsed >= duration_secs. |
duration_secs | uint64 | Length of the decay, or the TTL, in seconds. Greater than 0. |
anchor_field | string | Name of the TIMESTAMP property elapsed time is measured from. Required; must be a stored TIMESTAMP property of the same label. |
scope | TtlScopeType | TTL only: what expiry deletes. |
target_field | string | TTL with scope SUBTREE only: the DOCUMENT property expiry deletes. Empty otherwise. |
Configure
Read, and optionally change, the settings this connection applies to statements that do not carry their own, and to the transactions it begins. A transaction takes the settings in effect when its Begin arrives and keeps them until it ends; a later Configure does not reach it.
Every field is optional: one that is absent is left as it is, so a client changes one setting without restating the others, and a Configure with none set is simply a request to report the current status. The server answers with a ConnectionStatus whose settings are the ones now in effect, which is how a client confirms a change actually took rather than assuming it did.
| Field | Type | Description |
|---|---|---|
read_concern | ReadConcern | Default read concern for statements that carry none. |
write_concern | WriteConcern | Default write concern for statements that carry none. |
read_preference | ReadPreference | Default read preference for statements that carry none. |
timeout_outcome | TimeoutOutcome | What ends a transaction this session begins that stays idle past the idle timeout. UNSPECIFIED, like absent, leaves the setting as it is; the server's interactive_txn_timeout_outcome applies until a session sets one. |
vector_consistency | VectorConsistency | Vector consistency for statements whose query names none in a hint; the same setting a SET vector_consistency = '...' statement on this session changes. UNSPECIFIED, like absent, leaves the setting as it is. |
vector_build_wait_ms | uint32 | How long statements wait for a vector index still being built, in milliseconds, when their query names no bound in a hint; the same setting a SET vector_build_wait = '...' statement on this session changes. |
query_memory_limit_mb | uint32 | Memory limit of each statement, in MiB, when the statement names none; the same setting a SET query_memory_limit_mb = N statement on this session changes. Zero or a value past the administrative ceiling (4096 MiB) is rejected and changes nothing. |
ConnectionStatus
The state of this connection, from the serving node's point of view.
Sent unsolicited whenever it changes, with request_id zero, because the change a client is usually waiting for is one nobody asked about: a node cut off from the cluster cannot serve writes, and the client needs to know the moment it can again. Holding the session and waiting for that event beats retrying on a timer whose interval is a guess about how long an election takes. It is also the answer to a Configure, where request_id echoes it.
This describes THIS connection, not the cluster: it is what this node can do for this client right now. The cluster-wide picture, with every node's role and lag, is an operator's view and lives in the admin service.
| Field | Type | Description |
|---|---|---|
writable | bool | Whether statements that write can be served through this connection right now. True on the leader, and true on a follower that can reach the leader, since a write arriving at a follower is carried there. False when no leader is reachable, which is the condition a waiting client is watching for the end of. |
connected | bool | Whether this node has contact with the cluster at all. False on a node that has lost touch with its peers: reads from it still answer, from a snapshot that no longer advances. |
leader_id | uint64 | The node the cluster last named leader. Unset while an election is in flight or this node cannot tell. |
served_by_leader | bool | Whether the node serving this connection is itself the leader. A client that wants to avoid the forwarding hop can use this to decide whether to reconnect to the leader named above. |
raft_term | uint64 | Raft term this status was observed in. Increases at every election, so a client can tell a genuine leadership change from a repeated report. |
voters | uint32 | Voting members the cluster is configured with. |
voters_reachable | uint32 | Voting members this node currently counts as reachable, including itself. Compared against voters, this is what "the majority is present" means here, and it is what turns a vague outage into a number an operator and a client can both act on. |
settings | Configure | The settings in effect for statements that carry none of their own. Echoed whole so a client can confirm a Configure took effect, rather than assume the fields it sent are the ones now applied. |
ConsumerRetention
Whether a consumer's registration protects the history it still needs. One of the two must be chosen; there is no default.
| Field | Type | Description |
|---|---|---|
strict | StrictRetention | Protection lasts until the consumer is cancelled. Missing heartbeats do not end it, and the log keeps every entry from the acknowledged position on. |
ordinary | OrdinaryRetention | No protection: the registration records the acknowledged position only, and the log's own retention decides how far back it reaches. |
Credit
More credit for a subscription of this session: the server reads that many more log entries for it. Unused credit accumulates; each entry a batch passes uses one, whether or not it carried a unit. A subscription without credit sends nothing and holds no part of the session's flow-control window, so it never delays the other requests of the session.
| Field | Type | Description |
|---|---|---|
target_request_id | uint64 | request_id of the Subscribe frame that opened the subscription. |
events | uint32 | Log entries added to the subscription's credit. Above zero. |
CursorEnd
Closes a result cursor.
| Field | Type | Description |
|---|---|---|
stats | QueryStats | Final query statistics for the request. Reuses the unary query stats so the causal receipt and write counts decode identically. |
CursorOpen
Opens a result cursor.
| Field | Type | Description |
|---|---|---|
columns | string[] | Result column names, in result order. |
Execute
Execute one query statement.
| Field | Type | Description |
|---|---|---|
query | string | Query text in the session's dialect (Cypher today; SQL once the SQL frontend lands). The server selects a query frontend per session or per statement and never inspects the syntax above that frontend. |
parameters | map<string, PropertyValue> | Named query parameters bound at execution time. Same shape as the unary ExecuteCypherRequest parameters. |
txid | bytes | Interactive transaction this statement runs in, the ID its Begin carried. Empty means the statement is autonomous (implicit begin + commit). Set, it runs the statement inside that transaction: it reads the transaction's pinned snapshot and its writes buffer until Commit. A transaction runs one command at a time, in the order this stream delivers them: a client may send its statements without awaiting each answer. A statement that fails aborts the transaction; later commands for it are refused with ABORTED, reason TRANSACTION_ABORTED. So is a transaction whose statement was running when its stream was lost: the client cannot know what the statement did, and a statement never runs twice. A transaction this stream left between commands stays open for another stream, on any member, to continue. Any member passes the transaction's commands on to the leader, which alone holds open transactions. When the leader changes the transaction ends with nothing of it applied, and the new leader refuses its ID with NOT_FOUND, reason UNKNOWN_TRANSACTION; the client runs the transaction again under a new ID. The same answer comes for an ID nothing is open under, or one another caller opened. A value that is not 16 bytes is refused with INVALID_ARGUMENT. |
read_concern | ReadConcern | Read concern of this statement alone. Absent, the statement takes the session's (set by Configure), and a session that set none the server's configured default. Within the message, a level of READ_CONCERN_LEVEL_UNSPECIFIED, a zero after_ts, wait_ms or at_timestamp and an absent after_position likewise leave that part to the session. Refused with INVALID_ARGUMENT on a statement inside a transaction, which runs under the settings fixed at its Begin. |
write_concern | WriteConcern | Write concern of this statement alone, resolved and refused inside a transaction like read_concern. A combination the server cannot honour is refused with INVALID_ARGUMENT. |
read_preference | ReadPreference | Read preference of this statement alone, resolved and refused inside a transaction like read_concern. |
source | SourceLocation | Where in the client's code the statement was issued, for the query advisor: statements are counted per location, and one location issuing the same statement many times in a row is reported as an N+1 pattern. The application name and version come from the session's x-source-app and x-source-version metadata. Absent, the statement is counted without a location. |
operation | OperationRef | The client operation an autonomous statement (no transaction) carries out. Its writes take effect at most once however it is retried, on this stream or another: a retry of a statement that already took effect runs nothing and is answered with a SessionError naming its outcome (reason OPERATION_SETTLED). Absent runs the statement unbound. Refused inside a transaction, whose operation is named on its Begin or its Commit. |
ExpectedNodeVersion
A node and the version the caller believes it is at.
| Field | Type | Description |
|---|---|---|
node_id | uint64 | The node's id. |
version | uint64 | The version read earlier (Node.version). Unset requires the node NOT to exist, which is the create-if-absent form of the same condition; it is optional rather than a zero sentinel because zero is not a version a node can have, and a field that means "absent" must be able to say so. |
HistoryId
The consensus history a log position counts entries of: one group of one deployment. Positions of different histories are not comparable, and a deployment formed anew is a different history even for the same group.
| Field | Type | Description |
|---|---|---|
deployment | bytes | The deployment's identity, 16 bytes, as the serving member reports it. |
group | uint64 | The group within the deployment. |
HistoryPosition
A position in one history's log.
| Field | Type | Description |
|---|---|---|
history | HistoryId | The history index counts entries of. |
index | uint64 | The log index. |
Label
A node label as the catalog holds it.
| Field | Type | Description |
|---|---|---|
name | string | Label name. Case-sensitive. |
declared | bool | False for a label stored nodes carry without a definition; every other field is then empty. |
properties | PropertyDefinition[] | Stored properties, by name. |
computed_properties | ComputedPropertyDefinition[] | Computed properties, by name. |
schema_mode | SchemaMode | How the label validates and stores properties. |
temporal | bool | Whether nodes of the label carry a valid-time interval and keep one version per interval start. Fixed when the label is created. |
schema_revision | uint64 | Revision of the definition. Every published change of the definition or of the label's constraints advances it; a published revision never changes. |
candidate | LabelCandidate | A definition published but not yet in force: the stored nodes are being proved against it. The fields above stay the rules in force until the proof puts it in force; every write meanwhile must satisfy both. Unset when no proof is running. |
kind | LabelKind | Whether the label is a node's type or an auxiliary label. Fixed when the label is created. |
implies | string[] | For a type label, the labels every node of the type carries with it, as declared, sorted: the server writes them, transitively, on each node. Empty for an auxiliary label. Fixed when the label is created. |
LabelCandidate
A label definition published and being proved over the stored nodes.
| Field | Type | Description |
|---|---|---|
properties | PropertyDefinition[] | Stored properties it declares, by name. |
computed_properties | ComputedPropertyDefinition[] | Computed properties it declares, by name. |
schema_mode | SchemaMode | How it validates and stores properties. |
operation | uint64 | The operation proving it: awaited with AwaitSchema, cancelled with CancelIndexBuild. |
implies | LabelCandidateImplies | The labels the type implies once the candidate is in force; absent when the candidate leaves them as they are. Until then the label lookup and every index covering an affected label are reconciled to the new set in the background, and the implications in force still apply. |
LabelCandidateImplies
The implied labels a candidate puts in force, wrapped so that "no change" (absent) and "implies nothing" (present and empty) are told apart.
| Field | Type | Description |
|---|---|---|
labels | string[] | Label names, sorted, without repeats. |
LogicalChange
One effect of a committed transaction.
| Field | Type | Description |
|---|---|---|
ordinal | uint32 | Its place among the transaction's events, counted before any subscription filters them: with log_index and unit, the event's identity, the same for every subscription and every delivery of it. |
action | ChangeAction | What it does to its target. |
payload | bytes | The record or properties a PUT writes, or the delta a PATCH applies, in the storage encoding; empty for a REMOVE and for a relationship's presence. |
delivery | ChangeDelivery | How a node event reaches the subscription's labels: APPLY for a subscription following every label and for every relationship event. |
labels_before | Label[] | The labels a node carried before the transaction, its type's implied ones included; empty for a relationship event. |
labels_after | Label[] | The labels a node carries after the event, its type's implied ones included; empty for a relationship event. |
node | NodeTarget | A node's record, or one version of a temporal node. |
relationship | RelationshipTarget | A relationship's presence. |
properties | RelationshipTarget | The properties of a relationship that is neither versioned nor discriminated. |
instance | RelationshipTarget | One version or discriminated instance of a relationship, its properties included. |
scope | ScopeTarget | The labels a type implies, as one activation of a change to them left them: every node of the type gains and loses labels without a node event of its own. labels_before and labels_after name the type and what it implied before and implies after. |
blob_owner | bytes | What a blob owner holds, by its owner key: a PUT carries the owner record (the blob it now holds, not the blob's bytes), a REMOVE none. |
dropped_label | Label | A label a DROP ended: its identity, which a label created later under the same name does not share. labels_before holds it, labels_after is empty. Nodes of it the same transaction removed are removals of their own. |
MultiVector
An ordered set of equal-width vectors representing one item, as produced by late-interaction retrieval models (ColBERT v2, MaxSim) where a document is several token-level embeddings rather than one pooled vector.
Every row carries the same number of dimensions; the sender enforces that invariant, so a receiver may read rows[0] for the width.
| Field | Type | Description |
|---|---|---|
rows | Vector[] | — |
NameList
A list of names, present even when empty.
| Field | Type | Description |
|---|---|---|
names | string[] | The names. |
NodeTarget
A node and, for a temporal node, the version.
| Field | Type | Description |
|---|---|---|
node_id | uint64 | The node's id. |
valid_from | int64 | The version's start, in milliseconds since the Unix epoch, for a version of a temporal node. |
OperationRef
A reference to one client operation: what a client persists before sending a write and sends again with every retry of it, on any connection and to any member.
| Field | Type | Description |
|---|---|---|
issuer | bytes | The logical client: 16 bytes the client chooses once and keeps across its restarts (a random value, or a digest of a stable application identity). Independent clients use different issuers; a connection, session or server is not an issuer. |
incarnation | uint64 | The issuer's incarnation the number belongs to, from EnrollIssuerResponse. |
sequence | uint64 | The operation's number within the incarnation, allocated by the client: starting at EnrollIssuerResponse.next_sequence, each new write takes the next number, and a retry of a write keeps its number. Numbers are an identity, not an execution order: writes with different numbers may run concurrently and complete in any order. |
deployment | bytes | The deployment that enrolled the incarnation, 16 bytes, from EnrollIssuerResponse.deployment. A server of another deployment refuses the reference with INVALID_ARGUMENT, reason FOREIGN_OPERATION, rather than admit it as a new operation. |
OrdinaryRetention
Progress only, holding no history.
No fields.
Path
A graph path: the alternating node/relationship sequence produced by shortestPath(...) and by a variable-length MATCH p = (a)-[*]->(b).
rels has exactly one fewer entry than nodes on a non-empty path, and the n-th hop connects nodes[n] to nodes[n+1]. An empty path (a single node, zero hops) carries one node and no relationships.
| Field | Type | Description |
|---|---|---|
nodes | uint64[] | Node ids along the path, start to end. |
rels | PathRel[] | Relationship hops, in the same order. |
PathRel
One relationship hop inside a Path: its type and endpoint node ids. Relationship properties are not carried; fetch them by endpoint pair when they are needed.
| Field | Type | Description |
|---|---|---|
edge_type | string | — |
source | uint64 | — |
target | uint64 | — |
PropertyDefinition
A stored property of a label or edge type. Carries the type facts of one property only; whether its values are unique is a constraint, listed by ListConstraints.
| Field | Type | Description |
|---|---|---|
name | string | Property name, unique within the label or edge type. Case-sensitive. |
type | PropertyType | Declared type of the property's values. Required. |
required | bool | Whether every record must carry a non-null value. A write without one is refused. |
default_value | PropertyValue | Value a record reads when it does not carry the property. Unset: no default, and a missing property reads as null. |
PropertyType
The declared type of a stored property.
| Field | Type | Description |
|---|---|---|
scalar | ScalarType | A type without parameters. |
vector | VectorType | A dense vector with its dimensions and metric. |
array | ArrayType | An array of elements of one type. |
QueryStats
| Field | Type | Description |
|---|---|---|
nodes_created | int64 | — |
nodes_deleted | int64 | — |
edges_created | int64 | — |
edges_deleted | int64 | — |
properties_set | int64 | — |
execution_time_ms | int64 | — |
receipt | CausalReceipt | The statement's causal receipt: what a causal session folds into the after_ts (and, for a write, after_position) of its next statement. |
served_by_leader | bool | True when the read was served by the Raft leader. False for follower reads (read_preference = SECONDARY or NEAREST). |
commit_ts | uint64 | The HLC timestamp this statement's writes landed at, for a statement that committed on its own. Zero for a read, and for a statement inside an interactive transaction, whose timestamp belongs to the commit that ends it (coordinode.v1.session.Committed.commit_ts). This is the version of what the statement wrote: the same number Node.version reports and a session Commit's expect is stated against. A client that writes and then means to write again conditionally already holds what to state, with no read in between. |
read_as_of_ts | uint64 | Set by a member that does not run the version its group runs and so is read-only: the commit timestamp of the last entry it applied, which this read reflects and nothing after. Zero for a read served by a member that runs its group's version. A read that must be current is refused by such a member instead (FAILED_PRECONDITION, reason MEMBER_READ_ONLY). |
ReadConcern
Read concern configuration.
| Field | Type | Description |
|---|---|---|
level | ReadConcernLevel | Consistency level for this read. UNSPECIFIED defaults to LOCAL. |
after_ts | uint64 | Causal lower bound (afterClusterTime): the read is taken at a timestamp at or after this one, where every commit at or below it is applied. Set to the largest CausalReceipt.operation_time the session has received, from writes and reads alike, for read-your-writes and monotonic reads. HLC microseconds; 0 = no bound. Valid with level MAJORITY or SNAPSHOT (without at_timestamp); LOCAL or LINEARIZABLE with a causal bound is rejected with FAILED_PRECONDITION. A member that cannot meet the bound yet refuses the read with UNAVAILABLE, reason READ_NOT_READY, unless wait_ms lets it wait; it never answers from an earlier point. |
after_position | HistoryPosition | Causal position: the read is served only where this history has applied the entry, typically a write's CausalReceipt.position. A position of another history than the serving member's (another deployment or group, or a standalone server, which has no log) is rejected with FAILED_PRECONDITION. Same rules as after_ts otherwise. |
wait_ms | uint32 | How long, in milliseconds, the read may wait for a causal bound the serving member does not meet yet. 0 = no waiting: the read is refused as not ready at once. The wait never lowers the bound: when it runs out the read is refused the same way. It lasts no longer than the call: the call's deadline ends it with DEADLINE_EXCEEDED, reason QUERY_DEADLINE_EXCEEDED, and cancelling the call or the session statement with CANCELLED, reason QUERY_CANCELLED. The server sets no limit of its own on it. A waiting read holds one of the member's command places, so a member out of them refuses a further command before it runs with RESOURCE_EXHAUSTED, reason MEMBER_BUSY. |
at_timestamp | uint64 | Snapshot pin: read the database as of this HLC timestamp (microseconds since Unix epoch, leader-assigned). Only valid with level = SNAPSHOT. Setting this with any other level returns FAILED_PRECONDITION. 0 = no pin (latest snapshot of the chosen level applies). Typical use: time-travel reads ("what did this query return at 2026-05-15 12:00:00?"). The timestamp must be within the MVCC retention window; older snapshots are GC'd. Reads beyond retention return UNAVAILABLE. Distinct from after_ts: after_ts is a lower bound (any eligible view at or after it), at_timestamp is a pin (read exactly this version). The two are mutually exclusive. |
RelationshipTarget
A relationship, by type and endpoints, and its instance when it has one.
| Field | Type | Description |
|---|---|---|
edge_type | string | The relationship type's name. |
source_id | uint64 | The source node's id. |
target_id | uint64 | The target node's id. |
instance | bytes | The version or discriminator of an instance, in its key encoding; empty for a relationship's presence or properties. |
Rollback
Roll back an interactive transaction, discarding all buffered writes.
| Field | Type | Description |
|---|---|---|
txid | bytes | The transaction to roll back, the ID its Begin carried. |
Row
| Field | Type | Description |
|---|---|---|
values | PropertyValue[] | — |
RowBatch
A batch of result rows for an open cursor. Rows reuse the unary query Row message so a session result and a unary result decode identically.
| Field | Type | Description |
|---|---|---|
rows | Row[] | Result rows, each a list of property values aligned to CursorOpen.columns. |
ScopeTarget
A type whose implied labels one activation changed.
| Field | Type | Description |
|---|---|---|
label | Label | The type label. |
activation | uint64 | The activation that put the change in force: distinct for every change, a change back to an earlier declaration included. A subscription keeping state by label reconciles the type's nodes once per activation, or rebuilds the scope. |
ServerFrame
One result event sent by the server on the session stream.
| Field | Type | Description |
|---|---|---|
request_id | uint64 | request_id of the ClientFrame this event answers. |
cursor_open | CursorOpen | Opens a cursor for a query, carrying the column header. |
rows | RowBatch | A batch of result rows for an open cursor; many may arrive per request. |
cursor_end | CursorEnd | Closes a cursor, carrying final query statistics. |
committed | Committed | Acknowledges Commit, carrying the causal applied-index token. |
error | SessionError | Reports an error for the request; terminates its cursor. |
connection_status | ConnectionStatus | The state of this connection: whether it can serve writes, what it can see of the cluster, and the settings in effect. Sent in answer to a Configure, and unsolicited whenever the state changes. |
subscribed | Subscribed | Acknowledges Subscribe, carrying the registration's incarnation. |
change_events | ChangeEventBatch | Units of a subscription, in log order, from at most the credit left of log entries. |
acknowledged | Acknowledged | Acknowledges an acknowledge frame. |
subscription_cancelled | SubscriptionCancelled | Acknowledges a cancel_subscription frame. |
SessionError
Reports an error for a request.
| Field | Type | Description |
|---|---|---|
code | uint32 | Stable numeric error code (mirrors the gRPC status taxonomy used elsewhere on the server). Lets a client branch on the failure class without parsing the message text. |
message | string | Human-readable error detail for logs and diagnostics. Not a stable contract; branch on code, not on this string. |
status | Status | The canonical status for the error, with the same typed details (an ErrorInfo with its reason and metadata, a RetryInfo) the matching unary or server-streaming RPC returns in its grpc-status-details-bin trailer. Set for subscription errors (RETENTION_LOST, CONSUMER_TERMINATED, the registry's refusals); a client branches on its ErrorInfo reason. |
SourceLocation
A place in the client's source code, sent by a driver in debug mode.
| Field | Type | Description |
|---|---|---|
file | string | Source file path as the client knows it. |
line | uint32 | Line number in that file, starting at 1. |
function | string | Enclosing function or method name; empty when the client cannot tell. |
StrictRetention
Protection until cancellation.
No fields.
Subscribe
Open a change-stream subscription on the session.
The registration it reads as lives in the shard's consumer registry, not in the session: closing the session ends only delivery, and the consumer resumes its incarnation from another session or through the change-stream service.
| Field | Type | Description |
|---|---|---|
request | SubscribeRequest | Which consumer to register or resume and where to start, exactly as the change-stream service's Subscribe takes it. |
credit | uint32 | Log entries the client can take before its first Credit frame. Zero sends nothing until a Credit arrives. |
SubscribeRequest
| Field | Type | Description |
|---|---|---|
cursor | bytes | The cursor of the last batch received. Omit to start where the registration stands. |
interest | ChangeInterest | What the subscription follows; with a cursor, the interest it was read with, by the names its labels were created under. A cursor keeps the labels it was read with: when one of them was dropped and its name created again, the stream still reads the dropped label, its DROP included, and not the new one. |
consumer_id | string | The consumer this stream reads as: globally unique, chosen by the client. Required, non-empty and at most 65525 bytes of UTF-8; a longer id is refused with INVALID_ARGUMENT. |
incarnation | uint64 | 0 registers the consumer anew with retention, starting at cursor (or the oldest retained entry without one); refused with ALREADY_EXISTS while another incarnation of the id is live. Any other value resumes that live incarnation, and retention is ignored. |
retention | ConsumerRetention | Required when registering (incarnation 0). |
Subscribed
Acknowledges Subscribe.
| Field | Type | Description |
|---|---|---|
incarnation | uint64 | Incarnation of the registration the subscription reads as: the one just registered, or the one resumed. Pass it to acknowledge and cancel_subscription. |
SubscriptionCancelled
Acknowledges a cancel_subscription frame: the registration has ended.
No fields.
Timestamp
An instant on the time axis of a TIMESTAMP property.
| Field | Type | Description |
|---|---|---|
unix_micros | int64 | Microseconds since the Unix epoch (1970-01-01T00:00:00Z), signed: an instant before the epoch is negative. Microseconds are the database's own resolution, so the value round-trips exactly; a client converts it to its native type (a nanosecond type reaches it losslessly). |
VectorType
A dense vector type.
| Field | Type | Description |
|---|---|---|
dimensions | uint32 | Number of coordinates every value must have, from 1 to 65536. Zero declares no fixed length: values of any length are accepted, and a vector index takes its dimensions from its own definition. |
metric | DistanceMetric | Distance metric the property is compared by. UNSPECIFIED means COSINE. |
WriteConcern
Write concern configuration for a write statement or a session default.
Two independent axes, as in MongoDB: w (how many members acknowledge) and journal (what state each of them holds the write in). w is either a count of members or a named mode; the two never share a number space, so acks: 3 is three members in a group of any size and can never be confused with a mode. Leaving w unset selects the default, MAJORITY; asking for fire-and-forget is always explicit (acks: 0). Neither axis is ever silently changed to satisfy the other: a combination the server cannot honour is rejected with INVALID_ARGUMENT.
| Field | Type | Description |
|---|---|---|
journal | Journal | The state each counted member holds the write in. Omitted = JOURNAL. CACHE and MEMORY are accepted only with acks: 0 or acks: 1: a volatile state cannot be confirmed across members, so combining them with acks above 1 or with MAJORITY is rejected with INVALID_ARGUMENT. |
timeout_ms | uint32 | Time in milliseconds to wait for w to be satisfied; 0 = no timeout. On timeout the call fails, but the write is NOT rolled back: it may still commit afterwards. |
acks | uint32 | Number of members, the leader included, that must hold the write in the journal state before the caller is answered. 0 = fire-and-forget: the write still goes through the leader and the log, the caller is answered at once and is not told whether it committed. 1 = the leader alone (rollback possible if the leader fails before replication). N = N members. A value above the group's member count is rejected with INVALID_ARGUMENT. |
mode | WriteConcernMode | A named rule instead of a count. See WriteConcernMode. |
Enums
ChangeAction
What an event does to its target.
| Value | Number | Description |
|---|---|---|
CHANGE_ACTION_UNSPECIFIED | 0 | — |
CHANGE_ACTION_PUT | 1 | The target is written whole: it is replaced, or comes to exist. A PUT does not say which. |
CHANGE_ACTION_PATCH | 2 | The target changes by the payload's delta. |
CHANGE_ACTION_REMOVE | 3 | The target ceases to exist. |
CHANGE_ACTION_SCOPE_CHANGE | 4 | What a type implies changed: its nodes enter and leave label scopes with no node event of their own. |
CHANGE_ACTION_DROP | 5 | A label is dropped: its identity ends, its scope with it. |
ChangeDelivery
How a node event reaches a subscription following some labels.
| Value | Number | Description |
|---|---|---|
CHANGE_DELIVERY_UNSPECIFIED | 0 | — |
CHANGE_DELIVERY_APPLY | 1 | The node is in the subscription's scope before and after: the event applies. |
CHANGE_DELIVERY_ENTER | 2 | The node joins the scope with the record the event writes. |
CHANGE_DELIVERY_LEAVE | 3 | The node leaves the scope: deleted, relabelled or retyped out of it. |
ComputedType
The kind of COMPUTED property.
| Value | Number | Description |
|---|---|---|
COMPUTED_TYPE_UNSPECIFIED | 0 | Not a kind. Refused. |
COMPUTED_TYPE_TTL | 1 | The node, or part of it, is deleted once duration_secs has elapsed since the anchor_field timestamp; scope says which part. |
COMPUTED_TYPE_DECAY | 2 | Value interpolated from initial to target over duration_secs, evaluated when read: initial + (target - initial) * formula(elapsed). |
COMPUTED_TYPE_VECTOR_DECAY | 3 | Multiplier in [0, 1] that a vector similarity score is scaled by when read, from the formula over the time elapsed since anchor_field. |
DecayFormulaType
Decay formula of a DECAY or VECTOR_DECAY computed property. Every formula maps normalized time t in [0, 1] to a weight in [0, 1].
| Value | Number | Description |
|---|---|---|
DECAY_FORMULA_TYPE_UNSPECIFIED | 0 | LINEAR. |
DECAY_FORMULA_TYPE_LINEAR | 1 | f(t) = max(0, 1 - t): constant rate, zero at the end of the duration. |
DECAY_FORMULA_TYPE_EXPONENTIAL | 2 | f(t) = e^(-lambda * t). Requires lambda. |
DECAY_FORMULA_TYPE_POWER_LAW | 3 | f(t) = (1 + t / tau)^(-alpha): fast early decay with a long tail. Requires tau and alpha. |
DECAY_FORMULA_TYPE_STEP | 4 | f(t) = 1 while t < 1, then 0. |
DistanceMetric
| Value | Number | Description |
|---|---|---|
DISTANCE_METRIC_UNSPECIFIED | 0 | — |
DISTANCE_METRIC_COSINE | 1 | — |
DISTANCE_METRIC_L2 | 2 | — |
DISTANCE_METRIC_DOT | 3 | — |
DISTANCE_METRIC_L1 | 4 | — |
Journal
The state each acknowledging member must hold the write in before it counts towards w. Independent of w: w says how many members, journal says how durably each of them holds the write.
A write concern decides when the caller is answered, never whether the write is replicated: every write enters the group's log through the leader and is applied on every member. CACHE and MEMORY answer before the write is in the log and keep it in a volatile overlay until the drain proposes it; a leader crash before the drain loses every write still in that overlay. Use them for telemetry, hot counters and session state only, never for source-of-truth data.
| Value | Number | Description |
|---|---|---|
JOURNAL_UNSPECIFIED | 0 | Same as JOURNAL: the default when the field is omitted. |
JOURNAL_JOURNAL | 1 | The write is fsynced to the member's journal (the Raft log) before it is counted. Survives process crash and power failure. |
JOURNAL_CACHE | 2 | The write is in the member's RAM + NVMe overlay (~100µs) before it is counted. Survives a process crash, not a power failure before the drain. |
JOURNAL_MEMORY | 3 | The write is in the member's RAM-only overlay (~1µs) before it is counted. Visible at once to local readers that accept volatile data; lost on process crash before the drain. |
LabelKind
What a label is to the nodes carrying it. A node carries exactly one type label, found by kind whatever order its labels are written in, besides the labels that type implies and any auxiliary labels.
| Value | Number | Description |
|---|---|---|
LABEL_KIND_UNSPECIFIED | 0 | TYPE. |
LABEL_KIND_TYPE | 1 | The node's type: its definition gives the node's schema, mode and placement. A label used without a definition is a FLEXIBLE type label. |
LABEL_KIND_AUXILIARY | 2 | Classifies nodes (scope, role, tag). Declares no properties, is not temporal and is never a node's only label. |
ReadConcernLevel
Read concern levels.
| Value | Number | Description |
|---|---|---|
READ_CONCERN_LEVEL_UNSPECIFIED | 0 | — |
READ_CONCERN_LEVEL_LOCAL | 1 | Read from local replica (may be stale). |
READ_CONCERN_LEVEL_MAJORITY | 2 | Read data committed by majority. |
READ_CONCERN_LEVEL_LINEARIZABLE | 3 | Linearizable read (strongest guarantee). |
READ_CONCERN_LEVEL_SNAPSHOT | 4 | Read from a consistent MVCC snapshot. |
ReadPreference
Read preference for routing read operations.
| Value | Number | Description |
|---|---|---|
READ_PREFERENCE_UNSPECIFIED | 0 | — |
READ_PREFERENCE_PRIMARY | 1 | — |
READ_PREFERENCE_PRIMARY_PREFERRED | 2 | — |
READ_PREFERENCE_SECONDARY | 3 | — |
READ_PREFERENCE_SECONDARY_PREFERRED | 4 | — |
READ_PREFERENCE_NEAREST | 5 | — |
ScalarType
The scalar property types: types that take no parameters.
| Value | Number | Description |
|---|---|---|
SCALAR_TYPE_UNSPECIFIED | 0 | Not a type. Refused when a type is required. |
SCALAR_TYPE_STRING | 1 | UTF-8 text. |
SCALAR_TYPE_INT64 | 2 | Signed 64-bit integer. |
SCALAR_TYPE_FLOAT64 | 3 | IEEE 754 binary64 floating point number. |
SCALAR_TYPE_BOOL | 4 | Boolean. |
SCALAR_TYPE_TIMESTAMP | 5 | Point in time. |
SCALAR_TYPE_BLOB | 6 | Large binary object stored apart from the record and read by reference. |
SCALAR_TYPE_BINARY | 7 | Binary value stored inline in the record. |
SCALAR_TYPE_MAP | 8 | Map of string keys to values. |
SCALAR_TYPE_GEO | 9 | Geographic point or shape. |
SCALAR_TYPE_DOCUMENT | 10 | Arbitrary nested document; its content is not type-checked. |
SchemaMode
How a label validates and stores the properties of its nodes.
| Value | Number | Description |
|---|---|---|
SCHEMA_MODE_UNSPECIFIED | 0 | STRICT. |
SCHEMA_MODE_STRICT | 1 | Only declared properties are accepted; a write with any other is refused. Property names are interned, the most compact form. |
SCHEMA_MODE_VALIDATED | 2 | Declared properties are type-checked and interned; other properties are accepted unchecked and stored by name. |
SCHEMA_MODE_FLEXIBLE | 3 | No property is checked against the definition beyond requiredness and defaults; every property is stored by name. |
TimeoutOutcome
What ends an interactive transaction that stays idle past the server's idle timeout (interactive_txn_idle_timeout_secs).
| Value | Number | Description |
|---|---|---|
TIMEOUT_OUTCOME_UNSPECIFIED | 0 | Leaves the setting to the server's interactive_txn_timeout_outcome. |
TIMEOUT_OUTCOME_ROLLBACK | 1 | The transaction is rolled back: nothing of it is applied. |
TIMEOUT_OUTCOME_COMMIT | 2 | The transaction is committed as an explicit Commit would commit it, under the operation its Begin named; the client resolves that operation (OperationService.ResolveOperation) for the outcome. A transaction one of whose statements failed is rolled back instead. |
TtlScopeType
What a TTL computed property deletes when it expires.
| Value | Number | Description |
|---|---|---|
TTL_SCOPE_TYPE_UNSPECIFIED | 0 | NODE. |
TTL_SCOPE_TYPE_FIELD | 1 | Only the anchor_field property; the node remains. |
TTL_SCOPE_TYPE_SUBTREE | 2 | Only the DOCUMENT property named by target_field; the anchor_field timestamp remains. |
TTL_SCOPE_TYPE_NODE | 3 | The whole node with all its edges. |
VectorConsistency
How a vector search treats the read's snapshot: the same modes as the query hint vector_consistency('...') and the session command SET vector_consistency = '...'. A hint in the query wins over this setting.
| Value | Number | Description |
|---|---|---|
VECTOR_CONSISTENCY_UNSPECIFIED | 0 | Unset: left to the next level down, the session's setting and then the mode the query's read consistency implies. |
VECTOR_CONSISTENCY_CURRENT | 1 | The index's current state with no visibility filter: fastest, best recall, may include writes newer than the snapshot. |
VECTOR_CONSISTENCY_SNAPSHOT | 2 | Index candidates filtered by visibility at the snapshot. |
VECTOR_CONSISTENCY_EXACT | 3 | Every vector of the label at the snapshot, without the index: exact, and its cost grows with the label. |
WriteConcernMode
Named write concern modes: rules for w that are not a fixed count of members.
| Value | Number | Description |
|---|---|---|
WRITE_CONCERN_MODE_UNSPECIFIED | 0 | Not a valid choice on the wire: a WriteConcern whose w is unset means the default, MAJORITY. Set mode explicitly to one of the values below. |
WRITE_CONCERN_MODE_MAJORITY | 1 | Acknowledged once a majority of the group's members (the leader included) holds the write in the state named by journal. Survives the loss of a minority. The default. |
