Skip to main content

Module change_stream_record

Module change_stream_record 

Source
Expand description

Defines additional types related to ChangeStreamRecord.

Modules§

data_change_record
Defines additional types related to DataChangeRecord.
partition_event_record
Defines additional types related to PartitionEventRecord.

Structs§

DataChangeRecord
A data change record contains a set of changes to a table with the same modification type (insert, update, or delete) committed at the same commit timestamp in one change stream partition for the same transaction. Multiple data change records can be returned for the same transaction across multiple change stream partitions.
HeartbeatRecord
A heartbeat record is returned as a progress indicator, when there are no data changes or any other partition record types in the change stream partition.
PartitionEndRecord
A partition end record serves as a notification that the client should stop reading the partition. No further records are expected to be retrieved on it.
PartitionEventRecord
A partition event record describes key range changes for a change stream partition. The changes to a row defined by its primary key can be captured in one change stream partition for a specific time range, and then be captured in a different change stream partition for a different time range. This movement of key ranges across change stream partitions is a reflection of activities, such as Spanner’s dynamic splitting and load balancing, etc. Processing this event is needed if users want to guarantee processing of the changes for any key in timestamp order. If time ordered processing of changes for a primary key is not needed, this event can be ignored. To guarantee time ordered processing for each primary key, if the event describes move-ins, the reader of this partition needs to wait until the readers of the source partitions have processed all records with timestamps <= this PartitionEventRecord.commit_timestamp, before advancing beyond this PartitionEventRecord. If the event describes move-outs, the reader can notify the readers of the destination partitions that they can continue processing.
PartitionStartRecord
A partition start record serves as a notification that the client should schedule the partitions to be queried. PartitionStartRecord returns information about one or more partitions.

Enums§

Record
One of the change stream subrecords.