NAÏVE, CLIENT-SIDE SHARDING WITH ONLINE ADDITION OF SHARDS
First Claim
1. A computer-implemented method comprising:
- determining that a quantity of shards in a multi-shard system has changed;
in response to determining that the quantity of shards has changed, transitioning a client from a normal state, in which the client performs a particular type of operation relative to data items stored in the system in a first manner, to a rebalancing state, in which the client performs the particular type of operation relative to data items stored in the system in a second manner that differs from the first manner and without the client acquiring exclusive locks relative to any data items;
while the client is in the rebalancing state, determining, for one or more particular data items, destination shards that are separate from source shards on which the one or more particular data items were stored prior to the client'"'"'s transition to the rebalancing state; and
moving the one or more data items from the source shards to the destination shards while the client is in the rebalancing state.
1 Assignment
0 Petitions
Accused Products
Abstract
Multiple clients can be enabled to perform operations relative to data items in a shard system asynchronously to each other without the use by those clients of exclusive locks. A rebalancing event, in which data items are redistributed automatically among a set of shards due to a modification of the quantity of shards in the system, can be performed without the use of exclusive locks by clients. Clients can continue to perform operations relative to at least some of the data items in the shard system even while rebalancing processes are redistributing at least some of the data items asynchronously during a system-wide rebalancing event. All of these benefits can be obtained without sacrificing data consistency within the shard system.
41 Citations
20 Claims
-
1. A computer-implemented method comprising:
-
determining that a quantity of shards in a multi-shard system has changed; in response to determining that the quantity of shards has changed, transitioning a client from a normal state, in which the client performs a particular type of operation relative to data items stored in the system in a first manner, to a rebalancing state, in which the client performs the particular type of operation relative to data items stored in the system in a second manner that differs from the first manner and without the client acquiring exclusive locks relative to any data items; while the client is in the rebalancing state, determining, for one or more particular data items, destination shards that are separate from source shards on which the one or more particular data items were stored prior to the client'"'"'s transition to the rebalancing state; and moving the one or more data items from the source shards to the destination shards while the client is in the rebalancing state. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A system comprising:
-
a plurality of database shards that store data items; a plurality of clients that are configured to transition, in response to a change in a quantity of the plurality of database shards, from a normal state, in which each client of the plurality of clients is configured to perform a particular type of operation relative to the data items in a first manner, to a rebalancing state, in which each client of the plurality of clients is configured to perform the particular type of operation relative to the data items in a second manner that differs from the first manner and without the client acquiring exclusive locks relative to any data items; and at least one computing device configured to (a) determine, while the plurality of clients are in the rebalancing state, and for one or more particular data items, destination shards that are separate from source shards on which the one or more particular data items were stored while each client of the plurality of clients was in the normal state, and (b) move the one or more data items from the source shards to the destination shards while each client of the plurality of clients is in the rebalancing state.
-
-
20. A computer-readable storage memory storing processor-executable instructions comprising:
-
instructions to cause one or more processors to determine that a quantity of shards in a multi-shard system has changed; instructions to cause one or more processors to transition a client, in response to a determination that the quantity of shards has changed, from a normal state, in which the client performs a particular type of operation relative to data items stored in the system in a first manner, to a rebalancing state, in which the client performs the particular type of operation relative to data items stored in the system in a second manner that differs from the first manner and without the client acquiring exclusive locks relative to any data items; instructions to cause one or more processors to determine, while the client is in the rebalancing state, and for one or more particular data items, destination shards that are separate from source shards on which the one or more particular data items were stored prior to the client'"'"'s transition to the rebalancing state; and instructions to cause one or more processors to move the one or more data items from the source shards to the destination shards while the client is in the rebalancing state.
-
Specification