Patent ID: 11893042
Assignee: MONGODB, INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 16:
17. A computer-implemented system for resharding a sharded database of a collection of data, the system comprising:
a processor in communication with one or more first memories and one or more second memories, wherein the one or more first memories are for storing the collection of data according to a first shard key corresponding to the sharded database, and wherein the one or more second memories are for storing the collection of data according to a new shard key corresponding to a resharded database, the new shard key being different from the first shard key, the processor being programmed to perform acts comprised of:
(a) receiving an instruction to reshard the sharded database;
(b) receiving the new shard key to be used in a resharding process to reshard the sharded database;
(c) determining 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 the resharding process according to the new shard key, if the duration of unavailability is less than the predetermined amount of time, to produce the resharded database,
wherein the duration of unavailability is a first duration of unavailability, and the processor being programmed to perform acts 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;
(q) 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.