IP Library Granted Patent US 9,047,307
Granted Patent B1
US 9,047,307 · App. 13/959,055 · Granted Jun 2, 2015

Systems and methods for replicating data

Inventors: Sanjay Ghemawat (Mountain View, CA); Howard Gobioff (San Francisco, CA); Shun-Tak Leung (Mountatin View, CA)
Assignee: Google Inc.
G06F17/30174
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,047,307
App. No.
13/959,055
Granted
Jun 2, 2015
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 (39)

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 each directory identified in a full pathname of the file, the read lock associated with each directory identified in the full pathname preventing data from being read from each directory identified in the full pathname, and one of: a write lock associated with the full pathname of the file, the write lock preventing data from being written to the file, or a read lock associated with the full pathname of the file, the read lock associated with the full pathname preventing data from being read from the file;

generating a namespace tree that includes a plurality of nodes, each node of the plurality of nodes corresponding to an absolute file name or an absolute directory name, 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 the full pathname to a particular node of the plurality of nodes, 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 , where the set of locks includes the write lock associated with the full pathname of the file; and

where determining whether the lock conflicts with the other lock includes:

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

determining that the write lock associated with the full pathname conflicts with the other write lock associated with the full pathname.

3. The method of claim 1 , where the other lock includes a write lock associated with a directory identified in the full pathname; and

where determining whether the lock conflicts with the other lock includes:

determining that the write lock associated with the directory identified in the full pathname conflicts with the read lock included in the set of locks.

4. A device comprising:

one or more processors 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 each directory identified in a full pathname of the file, the read lock associated with each directory identified in the full pathname preventing data from being read from each directory identified in the full pathname, and one of: a write lock associated with the full pathname of the file, the write lock preventing data from being written to the file, or a read lock associated with the full pathname of the file, the read lock associated with the full pathname preventing data from being read from the file;

generating a namespace tree that includes a plurality of nodes, each node of the plurality of nodes corresponding to an absolute file name or an absolute directory name, 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 the full pathname to a particular node of the plurality of nodes, 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.

5. The device of claim 4 , where the set of locks includes the write lock associated with the full pathname of the file; and

where, when determining whether the lock conflicts with the other lock, the one or more processors are to:

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

determine that the write lock associated with the full pathname conflicts with the other write lock associated with the full pathname.

6. The device of claim 4 , where the other lock includes a write lock associated with a directory identified in the full pathname; and

where, when determining whether the lock conflicts with the other lock, the one or more processors are to:

determine that the write lock associated with the directory identified in the full pathname conflicts with the read lock included in the set of locks.

7. A non-transitory computer readable medium storing instructions, the instructions comprising:

one or more instructions that, when executed by one or more processors, cause the one or more processors 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 each directory identified in a full pathname of the file, the read lock associated with each directory identified in the full pathname preventing data from being read from each directory identified in the full pathname, and one of: a write lock associated with the full pathname of the file, the write lock preventing data from being written to the file, or a read lock associated with the full pathname of the file, the read lock associated with the full pathname preventing data from being read from the file;

generating a namespace tree that includes a plurality of nodes, each node of the plurality of nodes corresponding to an absolute file name or an absolute directory name, 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 the full pathname to a particular node of the plurality of nodes, 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.

8. The non-transitory computer readable medium of claim 7 , where the set of locks includes the write lock associated with the full pathname of the file; and

where the one or more instructions to determine whether the lock conflicts with the other lock include:

one or more instructions that, when executed by the one or more processors, cause the one or more processors to:

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

determine that the write lock associated with the full pathname conflicts with the other write lock associated with the full pathname.

9. The non-transitory computer readable medium of claim 7 , where the other lock includes a write lock associated with a directory identified in the full pathname; and

where the one or more instructions to determine whether the lock conflicts with the other lock include:

one or more instructions that, when executed by the one or more processors, cause the one or more processors to determine that the write lock associated with the directory identified in the full pathname conflicts with the read lock included in the set of locks.

Assignments (4)
CHANGE OF NAME Recorded Oct 2, 2017
From: GOOGLE INC.
To: GOOGLE LLC
Reel/Frame 044334/0466 →
MERGER Recorded Apr 21, 2014
From: GOOGLE TECHNOLOGY INC.
To: GOOGLE INC.
Reel/Frame 032721/0478 →
CORRECTIVE ASSIGNMENT TO CORRECT THE RECEIVING PARTY DATA PREVIOUSLY RECORDED ON REEL 032649 FRAME 0876. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT TO GOOGLE TECHNOLOGY INC.. Recorded Apr 21, 2014
From: GHEMAWAT, SANJAY; GOBIOFF, HOWARD; LEUNG, SHUN-TAK
To: GOOGLE TECHNOLOGY INC.
Reel/Frame 032724/0469 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 10, 2014
From: GHEMAWAT, SANJAY; GOBIOFF, HOWARD; LEUNG, SHUN-TAK
To: GOOGLE INC.
Reel/Frame 032649/0876 →
Continuity (5)
Continuation 13274043 · Oct 14, 2011
Continuation 12727138 · Mar 18, 2010
Continuation 10608139 · Jun 30, 2003
Provisional Application 60447277 · Feb 14, 2003
Provisional Application 60459648 · Apr 3, 2003