IP Library Granted Patent US 9,965,539
Granted Patent B2
US 9,965,539 · App. 14/855,629 · Granted May 8, 2018

Computer implemented method for dynamic sharding

Inventors: Carl Rene D'Halluin (Melle, BE); Frederik De Schrijver (Wenduine, BE); Jochen Maes (Laakdal, BE); Romain Raymond Agnes Slootmaekers (Heverlee, BE); Nicolas Maria Sylvain Trangez (Destelbergen, BE); Jan Doms (Ledeberg, BE)
Assignee: HGST Netherlands B.V.
G06F17/30584G06F17/3033G06F17/30289
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,965,539
App. No.
14/855,629
Granted
May 8, 2018
Kind
B2
Abstract

The present disclosure relates to systems and methods for dynamic sharding of a database comprising data identifiable by keys comprised within a global ordered range. When handling a request for data of at least one key: providing the request to a predetermined shard store; the predetermined shard store verifying, by means of its local subrange collection, whether the at least one key is present in a local subrange of a shard stored on the predetermined shard store; and when at least one key is not present in a local subrange of a shard stored on the predetermined shard store, returning a message comprising the local subrange collection of the predetermined shard store.

Claims (102)

1. A computer implemented method for dynamic sharding of a database comprising data identifiable by keys comprised within a global ordered range, the keys comprising an alphanumeric data object identifier, wherein the method comprises:

providing a plurality of shard stores, each of the plurality of shard stores comprising a shard store identifier and each of the plurality of shard stores being limited by a storage capacity limit;

providing a plurality of shards, each of the plurality of shards configured to handle requests for data of at least one key within a local subrange, wherein the local subrange comprises an ordered subrange of the global ordered range;

providing the plurality of shards on the plurality of shard stores so that a single shard does not extend beyond a single shard store;

providing on each of the plurality of shard stores a local subrange collection, each local subrange collection comprising one or more local subranges of the plurality of shards stored on a corresponding shard store;

providing a shard router, connected to the plurality of shard stores and adapted to handle the requests for data of at least one key;

providing on the shard router a global subrange collection adapted to correlate global subranges of the global ordered range to shard store identifiers; and

handling a request for data of at least one key by:

providing the request to the shard router;

the shard router determining that the shard store identifier is correlated to a global subrange comprising the at least one key of the request;

the shard router providing the request to a predetermined shard store associated with the correlated shard store identifier;

the predetermined shard store determining, by means of its local subrange collection, whether the at least one key is present in the local subrange of a shard stored on the predetermined shard store; and

in response to determining that the at least one key is not present in the one or more local subranges of the plurality of shards stored on the predetermined shard store;

returning a message comprising the local subrange collection of the predetermined shard store; and

the shard router updating its global subrange collection as a function of the message by correlating the shard store identifier of the predetermined shard store to the global subranges corresponding to local subranges of the local subrange collection of the message.

2. The computer implemented method according to claim 1 , further comprising:

in response to returning the message by the predetermined shard store, providing the request to a further shard store.

3. The computer implemented method according to claim 1 , wherein the local subrange collection of the predetermined shard store handling the request further comprises an external subrange collection, the external subrange collection comprising one or more external subranges of shards stored on other shard stores correlated to their respective shard store identifiers, and wherein the computer implemented method further comprises:

handling the request by the predetermined shard store, in response to determining that the at least one key is not present in the one or more local subranges of the shards stored on the predetermined shard store, wherein handling the request includes:

returning the message comprising the local subrange collection;

determining whether the at least one key of the request is comprised within a predetermined external subrange of the external subrange collection of the local subrange collection; and

providing the request subsequently to a further shard store of which the shard store identifier is correlated to the external subrange.

4. The computer implemented method according to claim 3 , further comprising:

in response to determining that the at least one key is not present in the one or more local subranges of the plurality of shards stored on the predetermined shard store:

the shard router further updating its global subrange collection as a function of the message by correlating the shard store identifier of the further shard store to a global subrange corresponding to the predetermined external subrange of the external subrange collection of the message.

5. The computer implemented method according to claim 1 , further comprising:

performing a move operation of a move shard comprising data of all keys within a move subrange from the predetermined shard store to a further shard store, wherein the move operation results in the move subrange being removed from the local subrange collection of the predetermined shard store and being added to an external subrange collection of the predetermined shard store as an external subrange correlated to the shard store identifier of the further shard store.

6. The computer implemented method according to claim 5 , wherein the move operation of the move shard comprising the data of all keys within the move subrange from the predetermined shard store to the further shard store results in the move subrange being added to the local subrange collection of the further shard store as a local subrange.

7. The computer implemented method according to claim 6 , wherein during the move operation only the local subrange collection of the predetermined shard store and the further shard store involved in the move operation are updated as a function of the move subrange.

8. The computer implemented method according to claim 5 , wherein the predetermined shard store and the further shard store involved in the move operation comprise a public local subrange collection and a private local subrange collection, and wherein the method further comprises, during the move operation:

the predetermined shard store updating its public local subrange collection as a function of the move subrange;

the predetermined shard store sending the move shard to the further shard store;

the further shard store receiving the move shard from the predetermined shard store;

in response to receiving the move shard, the further shard store:

updating both its public local subrange collection and its private local subrange collection as a function of the move subrange; and

sending a first move acknowledgment message to the predetermined shard store; and

in response to the predetermined shard store receiving the first move acknowledgment message from the further shard store, the predetermined shard store updating its private local subrange collection and deleting the move shard.

9. The computer implemented method according to claim 8 , further comprising:

in response to the predetermined shard store detecting, a predetermined time period after performing the move operation, that its public local subrange collection differs from its private local subrange collection, the predetermined shard store resending the move shard to the further shard store.

10. The computer implemented method according to claim 9 , further comprising:

in response to the further shard store being offered the move shard by the predetermined shard store and the move subrange being already present in the further shard store public local subrange collection, the further shard store sending a second move acknowledgment message to the predetermined shard store without receiving the move shard.

11. The computer implemented method according to claim 5 , wherein the move shard comprises at least an ordered subset of a shard of the predetermined shard store.

12. The computer implemented method according to claim 1 , further comprising:

in response to a move job that is provided for moving at least an ordered subset of a shard of which the size of exceeds a move size threshold, generating a plurality of move operations as a function of the move job so that the size of move shards of each of the plurality of move operations is less than or equal to the move size threshold, wherein the move job comprises a request for moving the ordered subset of the shard from the predetermined shard store to a further shard store until the plurality of move operations have resulted in moving:

a move job key range;

a move job amount of keys; and

a move job size of the ordered subset of the shard.

13. The computer implemented method according to claim 1 , further comprising:

in response to detecting that, for a predetermined shard, a further shard is available on a same shard store of which the local subrange is contiguous with the local subrange of the predetermined shard;

merging the predetermined shard with the further shard thus forming a merged shard; and

updating the local subrange collection by merging both contiguous local subranges of the predetermined shard and the further shard to a merged local subrange of the merged shard.

14. A non-transitory computer readable medium comprising software code which, when executed by a processor, causes the processor to perform a method for dynamic sharding of a database comprising data identifiable by keys comprised within a global ordered range, the keys comprising an alphanumeric data object identifier, wherein the method comprises:

providing a plurality of shard stores, each of the plurality of shard stores comprising a shard store identifier and each of the plurality of shard stores being limited by a storage capacity limit;

providing a plurality of shards, each of the plurality of shards configured to handle requests for data of at least one key within a local subrange, wherein the local subrange comprises an ordered subrange of the global ordered range;

providing the plurality of shards on the plurality of shard stores so that a single shard does not extend beyond a single shard store;

providing on each of the plurality of shard stores a local subrange collection, each local subrange collection comprising one or more local subranges of the plurality of shards stored on a corresponding shard store;

providing a shard router, connected to the plurality of shard stores and adapted to handle the requests for data of at least one key;

providing on the shard router a global subrange collection adapted to correlate global subranges of the global ordered range to shard store identifiers; and

handling a request for data of at least one key by:

providing the request to the shard router;

the shard router determining the shard store identifier correlated to a global subrange comprising the at least one key of the request;

the shard router providing the request to a predetermined shard store associated with the shard store identifier correlated to the global subrange;

the predetermined shard store determining, by means of its local subrange collection, whether the at least one key is present in the local subrange of a shard stored on the predetermined shard store; and

in response to determining that the at least one key is not present in the one or more local subranges of the plurality of shards stored on the predetermined shard store;

returning a message comprising the local subrange collection of the predetermined shard store; and

the shard router updating its global subrange collection as a function of the message by correlating the shard store identifier of the predetermined shard store to the global subranges corresponding to local subranges of the local subrange collection of the message.

15. The non-transitory computer readable medium of claim 14 , wherein the software code when executed by the processor causes the processor to perform the method further comprising:

in response to returning the message by the predetermined shard store, providing the request to a further shard store.

16. The non-transitory computer readable medium of claim 14 , wherein the local subrange collection of the predetermined shard store handling the request further comprises an external subrange collection, the external subrange collection comprising one or more external subranges of shards stored on other shard stores correlated to their respective shard store identifiers, and wherein the software code when executed by the processor causes the processor to perform the method further comprising:

handling the request by the predetermined shard store, in response to determining that the at least one key is not present in the one or more local subranges of the shards stored on the predetermined shard store, wherein handling the request includes:

returning the message comprising the local subrange collection;

determining whether the at least one key of the request is comprised within a predetermined external subrange of the external subrange collection of the local subrange collection; and

providing the request subsequently to a further shard store of which the shard store identifier is correlated to the external subrange.

17. The non-transitory computer readable medium of claim 16 , wherein the software code when executed by the processor causes the processor to perform the method further comprising:

in response to determining that the at least one key is not present in the one or more local subranges of the plurality of shards stored on the predetermined shard store:

the shard router further updating its global subrange collection as a function of the message by correlating the shard store identifier of the further shard store to a global subrange corresponding to the predetermined external subrange of the external subrange collection of the message.

18. The non-transitory computer readable medium of claim 14 , wherein the software code when executed by the processor causes the processor to perform the method further comprising:

performing a move operation of a move shard comprising data of all keys within a move subrange from the predetermined shard store to a further shard store, wherein the move operation results in the move subrange being removed from the local subrange collection of the predetermined shard store and being added to an external subrange collection of the predetermined shard store as an external subrange correlated to the shard store identifier of the further shard store.

19. The non-transitory computer readable medium of claim 18 , wherein the move operation of the move shard comprising the data of all keys within the move subrange from the predetermined shard store to the further shard store results in the move subrange being added to the local subrange collection of the further shard store as a local subrange.

20. The non-transitory computer readable medium of claim 19 , wherein during the move operation only the local subrange collection of the predetermined shard store and the further shard store involved in the move operation are updated as a function of the move subrange.

21. The non-transitory computer readable medium of claim 18 , wherein the predetermined shard store and the further shard store involved in the move operation comprise a public local subrange collection and a private local subrange collection, and wherein the software code when executed by the processor causes the computer to perform the method further comprising, during the move operation:

the predetermined shard store updating its public local subrange collection as a function of the move subrange;

the predetermined shard store sending the move shard to the further shard store;

the further shard store receiving the move shard from the predetermined shard store;

in response to receiving the move shard, the further shard store:

updating both its public local subrange collection and its private local subrange collection as a function of the move subrange; and

sending a first move acknowledgment message to the predetermined shard store; and

in response to the predetermined shard store receiving the first move acknowledgment message from the further shard store, the predetermined shard store updating its private local subrange collection and deleting the move shard.

22. The non-transitory computer readable medium of claim 21 , wherein the software code when executed by the processor causes the processor to perform the method further comprising:

in response to the predetermined shard store detecting, a predetermined time period after performing the move operation, that its public local subrange collection differs from its private local subrange collection, the predetermined shard store resending the move shard to the further shard store.

23. The non-transitory computer readable medium of claim 22 , wherein the software code when executed by the processor causes the processor to perform the method further comprising:

in response to the further shard store being offered the move shard by the predetermined shard store and the move subrange being already present in the further shard store public local subrange collection, the further shard store sending a second move acknowledgment message to the predetermined shard store without receiving the move shard.

24. The non-transitory computer readable medium of claim 18 , wherein the move shard comprises at least an ordered subset of a shard of the predetermined shard store.

25. The non-transitory computer readable medium of claim 14 , wherein the software code when executed by the processor causes the processor to perform the method further comprising:

in response to a move job that is provided for moving at least an ordered subset of a shard of which the size of exceeds a move size threshold, generating a plurality of move operations as a function of the move job so that the size of move shards of each of the plurality of move operations is less than or equal to the move size threshold, wherein the move job comprises a request for moving the ordered subset of the shard from the predetermined shard store to a further shard store until the plurality of move operations have resulted in moving:

a move job key range;

a move job amount of keys; and

a move job size of the ordered subset of the shard.

26. The non-transitory computer readable medium of claim 14 , wherein the software code when executed by the processor causes the processor to perform the method further comprising:

in response to detecting that, for a predetermined shard, a further shard is available on a same shard store of which the local subrange is contiguous with the local subrange of the predetermined shard;

merging the predetermined shard with the further shard thus forming a merged shard; and

updating the local subrange collection by merging both contiguous local subranges of the predetermined shard and the further shard to a merged local subrange of the merged shard.

Assignments (12)
PATENT COLLATERAL AGREEMENT - A&R LOAN AGREEMENT Recorded Aug 21, 2023
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 064715/0001 →
PATENT COLLATERAL AGREEMENT - DDTL LOAN AGREEMENT Recorded Aug 21, 2023
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 067045/0156 →
RELEASE OF SECURITY INTEREST AT REEL 052915 FRAME 0566 Recorded Feb 8, 2022
From: JPMORGAN CHASE BANK, N.A.
To: WESTERN DIGITAL TECHNOLOGIES, INC.
Reel/Frame 059127/0001 →
SECURITY INTEREST Recorded Feb 6, 2020
From: WESTERN DIGITAL TECHNOLOGIES, INC.
To: JPMORGAN CHASE BANK, N.A., AS AGENT
Reel/Frame 052915/0566 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 29, 2018
From: AMPLIDATA NV
To: WESTERN DIGITAL TECHNOLOGIES, INC.
Reel/Frame 046739/0176 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 19, 2018
From: D'HALLUIN, CARL RENE
To: AMPLIDATA NV
Reel/Frame 046123/0795 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 19, 2018
From: SLOOTMAEKERS, ROMAIN RAYMOND AGNES
To: AMPLIDATA NV
Reel/Frame 046123/0800 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 19, 2018
From: TRANGEZ, NICOLAS
To: AMPLIDATA NV
Reel/Frame 046123/0793 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 19, 2018
From: MAES, JOCHEN
To: AMPLIDATA NV
Reel/Frame 046123/0791 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 18, 2018
From: DE SCHRIJVER, FREDERIK
To: AMPLIDATA NV
Reel/Frame 046123/0755 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 18, 2018
From: DOMS, JAN
To: AMPLIDATA NV
Reel/Frame 046123/0761 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 13, 2016
From: D'HALLUIN, CARL RENE; DE SCHRIJVER, FREDERIK; MAES, JOCHEN; SLOOTMAEKERS, ROMAIN RAYMOND AGNES; TRANGEZ, NICOLAS MARIA SYLVAIN; DOMS, JAN
To: HGST NETHERLANDS B.V.
Reel/Frame 038900/0441 →
Priority Claims (1)
EP 14185304 · Sep 18, 2014 · regional
Continuity (1)
Related Publication 20160085839A1 · Mar 24, 2016