Replica group modification in a distributed database
AssigneeAmazon Technologies, Inc.
InventorDumanshu Goyal
Life of this patent
Estimating the term…
Abstract
Methods, systems, and computer-readable media for replica group modification in a distributed database are disclosed. One or more stream processors write elements of a data stream to a plurality of replicas in a replica group. A control plane adds an identifier of a new replica to membership metadata for the replica group. The control plane also generates a new version number for the membership metadata that now includes the new replica. The stream processor(s) write new elements of the data stream to the replica group including the new replica. Write requests to the replica group comprise the new version number, and successful writes of the new elements are acknowledged by the replicas based at least in part on the new version number.
Claims20
A system, comprising:
- one or more processors and memory configured to implement a stream processor configured to write elements of a data stream to a plurality of replicas in a replica group;
- and
- one or more processors and one or more memories that store computer-executable instructions that, if executed, implement a control plane configured to:
- cause a new replica to be initialized;
- add an identifier of the new replica to membership metadata for the replica group, wherein the membership metadata includes respective identifiers of respective replicas of the replica group;
- and
- generate an incremented version number for the membership metadata that includes the identifier of the new replica, wherein the membership metadata having the incremented version number is provided to at least one of the replicas;
- wherein the stream processor is further configured to:
- begin writing new elements of the data stream to the replica group including the new replica, wherein write requests from the stream processor comprise respective ones of the new elements and the incremented version number of the membership metadata, and wherein successful writes of the respective ones of the new elements are acknowledged by respective ones of the replicas based at least in part on a comparison of the incremented version number of the membership metadata included as part of the write requests to a local version number of the membership metadata stored at the respective replica, and wherein the replica group is eventually consistent.
A method, comprising:
- writing, by one or more stream processors, elements of a data stream to a plurality of replicas in a replica group;
- adding, by a control plane configured to manage the replica group, an indication of a new replica that has been added by the control plane to the replica group, to metadata for the replica group;
- generating, by the control plane, an indication of a state transition for the metadata, wherein the state transition represents the addition of the new replica to the replica group;
- and
- writing, by the one or more stream processors, new elements of the data stream to the replica group including the new replica, wherein write requests to the replica group comprise respective ones of the new elements and the indication of the state transition for the metadata, and wherein successful writes of the respective ones of the new elements are acknowledged by respective ones of the replicas based at least in part on a comparison of the indication of the state transition to an indication of state for the metadata at the respective replica.
One or more non-transitory computer-readable storage media storing program instructions that, when executed on or across one or more processors, perform:
- writing, by one or more stream processors, elements of a data stream to a plurality of replicas in a replica group;
- adding, by a control plane configured to manage the replica group, an identifier of a new replica that has been added by the control plane to the replica group, to membership metadata for the replica group;
- generating, by the control plane, an incremented version number for the membership metadata that includes the identifier of the new replica;
- and
- writing, by the one or more stream processors, new elements of the data stream to the replica group including the new replica, wherein write requests to the replica group comprise respective ones of the new elements and the incremented version number for the membership metadata, and wherein successful writes of the respective ones of the new elements are acknowledged by respective ones of the replicas based at least in part on a comparison of the incremented version number of the membership metadata included as part of the write requests to a local version number of the membership metadata stored at the respective replica.
Dependencies are inferred from the claim text.