IP Library Granted Patent US 9,621,651
Granted Patent B1
US 9,621,651 · App. 14/723,011 · Granted Apr 11, 2017

Systems and methods for replicating data

Inventors: Sanjay Ghemawat (Mountain View, CA); Howard Gobioff (San Francisco, CA); Shun-Tak Leung (Mountain View, CA)
Assignee: Google Inc.
H04L67/1095
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,621,651
App. No.
14/723,011
Granted
Apr 11, 2017
Kind
B1
Abstract

A system facilitates the distribution and redistribution of chunks of data among multiple servers. The system may identify servers to store a replica of the data based on at least one of utilization of the servers, prior data distribution involving the servers, and failure correlation properties associated with the servers, and place the replicas of the data at the identified servers. The system may also monitor total numbers of replicas of the chunks available in the system, identify chunks that have a total number of replicas below one or more chunk thresholds, assign priorities to the identified chunks, and re-replicate the identified chunks based substantially on the assigned priorities. The system may further monitor utilization of the servers, determine whether to redistribute any of the replicas, select one or more of the replicas to redistribute based on the utilization of the servers, select one or more of the servers to which to move the one or more replicas, and move the one or more replicas to the selected one or more servers.

Claims (43)

1. A method, comprising:

acquiring, by a device, a set of locks for performing a first operation associated with a file stored in a memory, the set of locks including a read lock associated with the file that prevents data from being read from the file, and a write lock associated with the file that prevents data from being written to the file;

generating a namespace tree that includes a plurality of nodes, each node of the plurality of nodes corresponding to a respective file, and each node having an associated read lock and an associated write lock;

determining, by the device, whether a lock, included in the set of locks, conflicts with another lock included in another set of locks acquired to perform a second operation, including mapping a particular node of the plurality of nodes to the file, and determining whether the lock conflicts with the other lock based on the read lock and the write lock associated with the particular node; and

performing, by the device, the first operation and the second operation, the first operation being performed in parallel with the second operation when the lock does not conflict with the other lock, and the first operation and the second operation being performed in series when the lock conflicts with the other lock.

2. The method of claim 1 , wherein determining whether the lock conflicts with the other lock comprises:

determining that the other lock includes another write lock associated with the file, and

determining that the write lock associated with the file conflicts with the other write lock associated with the file.

3. The method of claim 1 , wherein the other lock includes a write lock associated with the file; and

wherein determining whether the lock conflicts with the other lock comprises determining that the write lock associated with the file conflicts with the read lock included in the set of locks.

4. The method of claim 1 , wherein determining whether the lock conflicts with the other lock comprises:

accessing a data structure that maps the file to acquired locks, and

using the data structure to determine whether the lock conflicts with the other lock.

5. The method of claim 4 , wherein the data structure includes a hash table that maps the file to the acquired locks.

6. A device comprising:

one or more processors configured to:

acquire a set of locks for performing a first operation associated with a file stored in a memory, the set of locks including a read lock associated with the file that prevents data from being read from the file, and a write lock associated with the file that prevents data from being written to the file;

generate a namespace tree that includes a plurality of nodes, each node of the plurality of nodes corresponding to a respective file, and each node having an associated read lock and an associated write lock;

determine whether a lock, included in the set of locks, conflicts with another lock included in another set of locks acquired to perform a second operation, including mapping a particular node of the plurality of nodes to the file, and determining whether the lock conflicts with the other lock based on the read lock and the write lock associated with the particular node; and

perform the first operation and the second operation, the first operation being performed in parallel with the second operation when the lock does not conflict with the other lock, and the first operation and the second operation being performed in series when the lock conflicts with the other lock.

7. The device of claim 6 , wherein to determine whether the lock conflicts with the other lock, the one or more processors are configured to:

determine that the other lock includes another write lock associated with the file, and

determine that the write lock associated with the file conflicts with the other write lock associated with the file.

8. The device of claim 6 , wherein the other lock includes a write lock associated with the file; and

wherein to determine whether the lock conflicts with the other lock, the one or more processors are configured to determine that the write lock associated with the file conflicts with the read lock included in the set of locks.

9. The device of claim 6 , wherein to determine whether the lock conflicts with the other lock, the one or more processors are configured to:

access a data structure that maps the file to acquired locks, and

use the data structure to determine whether the lock conflicts with the other lock.

10. The device of claim 9 , wherein the data structure includes a hash table that maps the file to the acquired locks.

11. A non-transitory computer readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:

acquiring, by a device, a set of locks for performing a first operation associated with a file stored in a memory, the set of locks including a read lock associated with the file that prevents data from being read from the file, and a write lock associated with the file that prevents data from being written to the file;

generating a namespace tree that includes a plurality of nodes, each node of the plurality of nodes corresponding to a respective file, and each node having an associated read lock and an associated write lock;

determining, by the device, whether a lock, included in the set of locks, conflicts with another lock included in another set of locks acquired to perform a second operation, including mapping a particular node of the plurality of nodes to the file, and determining whether the lock conflicts with the other lock based on the read lock and the write lock associated with the particular node; and

performing, by the device, the first operation and the second operation, the first operation being performed in parallel with the second operation when the lock does not conflict with the other lock, and the first operation and the second operation being performed in series when the lock conflicts with the other lock.

12. The computer readable medium of claim 11 , wherein determining whether the lock conflicts with the other lock comprises:

determining that the other lock includes another write lock associated with the file, and

determining that the write lock associated with the file conflicts with the other write lock associated with the file.

13. The computer readable medium of claim 11 , wherein the other lock includes a write lock associated with the file; and

wherein determining whether the lock conflicts with the other lock comprises determining that the write lock associated with the file conflicts with the read lock included in the set of locks.

14. The computer readable medium of claim 11 , wherein determining whether the lock conflicts with the other lock comprises:

accessing a data structure that maps the file to acquired locks, and

using the data structure to determine whether the lock conflicts with the other lock.

15. The computer readable medium of claim 14 , wherein the data structure includes a hash table that maps the file to the acquired locks.

Assignments (3)
CHANGE OF NAME Recorded Oct 4, 2017
From: GOOGLE INC.
To: GOOGLE LLC
Reel/Frame 044118/0740 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 17, 2015
From: GHEMAWAT, SANJAY; GOBIOFF, HOWARD; LEUNG, SHUN-TAK
To: GOOGLE TECHNOLOGY INC.
Reel/Frame 036593/0723 →
MERGER Recorded Sep 17, 2015
From: GOOGLE TECHNOLOGY INC.
To: GOOGLE INC.
Reel/Frame 036594/0017 →
Continuity (6)
Continuation 13959055 · Aug 5, 2013
Continuation 13274043 · Oct 14, 2011
Continuation 12727138 · Mar 18, 2010
Continuation 10608139 · Jun 30, 2003
Provisional Application 60459648 · Apr 3, 2003
Provisional Application 60447277 · Feb 14, 2003