×

Database systems and applications for assigning records to chunks of a partition in a non-relational database system with auto-balancing

  • US 11,921,750 B2
  • Filed: 10/29/2018
  • Issued: 03/05/2024
  • Est. Priority Date: 10/29/2018
  • Status: Active Grant
First Claim
Patent Images

1. A method for performing an auto-balancing operation in a partition of hardware-based network storage of a non-relational database system that comprises a plurality of partitions the method comprising:

  • assigning a plurality of records having a common attribute for grouping and stored to a same partition of the plurality of partitions to a plurality of chunks within the same partition without affecting a location of records in the hardware-based network storage, wherein each chunk of the plurality of chunks comprises a respective unique group of records of the plurality of records and a unique chunk identifier that identifies that chunk within that same partition, wherein assigning the plurality of records comprises, for a particular record of the plurality of records;

    mapping a respective record key uniquely identifying the particular record to a natural chunk identifier, wherein the respective record key comprises data from one or more fields of the particular record and the natural chunk identifier comprises a numerical value corresponding to the data from the one or more fields of the particular record;

    assigning the particular record to a particular candidate chunk of the same partition having a particular chunk identifier (chunk_identifier(k)) that is a closest chunk available for insertion of the particular record at a particular time that satisfies an assignment formula;

    chunk_identifier(k)≤

    f(record key)<

    chunk_identifier(k+1), where f(record key) corresponds to the natural chunk identifier determined by the mapping of the data from the one or more fields of the particular record, where k and k+1 are indices of two consecutive chunks and chunk identifiers of the plurality of chunks are in sorted order, wherein the particular candidate chunk of the same partition comprises the respective unique group of records sorted by their corresponding record keys;

    determining a first chunk of the plurality of chunks should be split when a number of records in the first chunk of the same partition exceeds a particular threshold number when a new record is inserted into the partition and assigned to the first chunk according to the assignment formula; and

    after determining the first chunk should be split;

    determining a new chunk identifier for splitting the first chunk based at least in part on the respective record key uniquely identifying the new record and the respective unique group of records sorted by their corresponding record keys assigned to the first chunk; and

    updating the respective chunk identifier associated with a first subset of the number of records that were originally part of the first chunk to the new chunk identifier to assign the first subset of the number of records to a new chunk without affecting the location of the records in the hardware-based network storage, wherein a second subset of the number of records originally assigned to the first chunk of the same partition remain assigned to the first chunk such that the number of records originally assigned to the first chunk are divided among the first chunk of the same partition and the new chunk of the same partition such that the assignment formula is satisfied after the updating is complete, wherein the respective unique group of records in each chunk are processible as a unit without iterating through all records of the same partition.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×