Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: IGNITE-16023 Remove live schema leftovers from the protocol

...

Key tuples are tuples with key columns only. Key columns always come first in the schema. So if there are 2 key columns, first two values of the tuple is the key.

Dynamic schema expansion (Live-schema)

IEP-54: Schema-first Approach includes "dynamic schema expansion" feature, which means that users can insert arbitrary tuples and Ignite will automatically update the schema with extra fields, if any.

To support this feature, we provide schemaless alternatives for all operations that can involve automatic schema updates (upsert, insert, etc).

Handshake


Request
4 bytesMagic number 49 47 4E 49, or "IGNI". Helps to identify misconfigured SSL or other apps probing the port.
intPayload length
intVersion major
intVersion minor
intVersion patch
intClient code (1 for JDBC, 2 for general-purpose client)
binFeatures (bitmask)
map (string → any)Extensions (auth, attributes, etc). Server can skip unknown extension data (when client is newer).

...

  • If columns don't match, request the latest schema and try again.
  • If the latest schema still does not match, and live schema is enabled, use TUPLE_UPSERT_SCHEMALESS

TUPLE

...

_

...

Basic response.

TUPLE_GET = 12

Request
UUIDtable ID
intschema ID
valuesvalues for key columns (in schema order)

...

Request
UUIDtable ID
intschema ID
introw count
valuesrows with values for all columns in given schema (nil when value is missing for a column)

Basic response.

TUPLE_UPSERT_ALL_SCHEMALESS = 14

Request
UUIDtable ID
arr of maparray of tuples

Basic response.

TUPLE_GET_ALL = 15

...

Response
int or nilschema id for the current tuple, or nil when there is no matching record
valuesvalues for value columns in schema order

TUPLE

...

_

...

TUPLE_INSERT = 18

Request
UUIDtable ID
intschema ID
valuesvalues for all columns in given schema (nil when value is missing for a column)
Response
boolInsert result

TUPLE_INSERT_SCHEMALESS = 19

Request
UUIDtable ID
maptuple as map


Response
boolInsert result

...

Response
intschema id, or nil when no rows were skipped
intskipped row count
valuesskipped rows (values in schema order)

TUPLE_INSERT_ALL_SCHEMALESS = 21

RequestUUIDtable IDarr of maparray of tuples
Response
arr of mapskipped rows, or nil when none were skipped

TUPLE_REPLACE = 22

Request
UUIDtable ID
intschema ID
valuesvalues for all columns in given schema (nil when value is missing for a column)
Response
boolReplace result

TUPLE_REPLACE_SCHEMALESS = 23

Request
UUIDtable ID
maptuple as map


Response
boolReplace result

...

Response
boolReplace result

TUPLE_

...

TUPLE_GET_AND_REPLACE = 26

Request
UUIDtable ID
intschema ID
valuesvalues for all columns in given schema (nil when value is missing for a column)

...

Response
int or nilschema id for the current tuple, or nil when there is no matching record
valuesvalues for value columns in schema order

TUPLE_GET_AND_REPLACE_SCHEMALESS = 27

Request
UUIDtable ID
maptuple as map
Response
int or nilschema id for the current tuple, or nil when there is no matching record
valuestuple values in schema order

TUPLE_DELETE = 28

...

Request
UUIDtable ID
intschema ID
introw count
valuesrows with values for key columns in a given schema


Response
intschema id, or nil when no rows were skipped
intskipped row count
valuesskipped rows (values for key columns in schema order)


TUPLE_DELETE_EXACT = 30

Request
UUIDtable ID
intschema ID
valuesvalues for all columns in given schema (nil when value is missing for a column)

...

Request
UUIDtable ID
intschema ID
introw count
valuesrows with values for all columns in given schema (nil when value is missing for a column)


Response
intschema id, or nil when no rows were skipped
intskipped row count
valuesskipped rows (values for key columns in schema order)

TUPLE_GET_AND_DELETE = 32

...