CPC G06F 16/278 (2019.01) [G06F 16/285 (2019.01)] | 18 Claims |
1. A computer-implemented method of resharding a sharded database of a collection of data sharded according to a first shard key, the method comprising steps of:
(a) receiving, by a processor, an instruction to reshard the sharded database;
(b) receiving, by the processor, a new shard key to be used in a resharding process to reshard the sharded database;
(c) determining, by the processor, whether a duration of unavailability of the sharded database during the resharding process is less than a predetermined amount of time; and
(d) automatically performing, by the processor, the resharding process according to the new shard key, if the duration of unavailability is less than the predetermined amount of time, to produce a resharded database of the collection of data,
wherein the sharded database is stored in one or more first memories and the resharded database is stored in one or more second memories, the one or more second memories being same as or different from the one or more first memories,
wherein the duration of unavailability is a first duration of unavailability, and the method is further comprised of:
(e) performing, by the processor, the resharding process for a first period of time if the first duration of unavailability is determined to be equal to or greater than the predetermined amount of time;
(f) determining, by the processor after the first period of time, whether a current duration of unavailability of the sharded database is less than the first duration of unavailability;
(g) performing, by the processor, the resharding process for a second period of time if the current duration of unavailability is less than the first duration of unavailability; and
(h) automatically cancelling, by the processor, the resharding process if the current duration of unavailability determined at step (f) is equal to or greater than the first duration of unavailability.
|