Outcast index in a distributed file system
First Claim
Patent Images
1. A method, comprising:
- receiving, by a processing device of a first server, an indication that a first replica stored on the first server is to be modified in view of a second replica stored on a second server, wherein the first replica and the second replica are replicas of a same file, wherein the first server comprises metadata for a plurality of replicas including the first replica and the second replica, wherein the metadata comprises a plurality of bitmaps, wherein each of the plurality of bitmaps is to indicate a state of one replica, wherein each of the plurality of bitmaps comprises a set of bits, wherein each bit in the set of bits corresponds to a pending count of updates the one replica missed;
updating, by the processing device, a first metadata associated with the first replica to indicate an outcast state of the first replica;
checking whether the first replica has a pending lock for a modification process to modify the first replica in view of the second replica;
determining that the modification process is still in progress when the first replica has the pending lock;
determining that the modification process ended abnormally when the first replica does not have the pending lock and the first metadata indicates the outcast state of the first replica;
repairing the first replica from a third replica in view of the determining that the modification process ended abnormally; and
updating the first metadata to remove the outcast state of the first replica in response to an indication that the modification process of the first replica is complete or that the first replica has been repaired.
1 Assignment
0 Petitions
Accused Products
Abstract
An outcast index in a distributed file system is described. A first server can receive an indication that a first replica stored on the first server is to be modified in view of a second replica stored on a second server. The first replica and the second replica are replicas of a same file. The first server updates metadata associated with the first replica to indicate an outcast state of the first replica. The first server receives an indication that the modification of the first replica is complete. The first server updates the metadata associated with the first replica to remove the outcast state of the first replica.
-
Citations
14 Claims
-
1. A method, comprising:
-
receiving, by a processing device of a first server, an indication that a first replica stored on the first server is to be modified in view of a second replica stored on a second server, wherein the first replica and the second replica are replicas of a same file, wherein the first server comprises metadata for a plurality of replicas including the first replica and the second replica, wherein the metadata comprises a plurality of bitmaps, wherein each of the plurality of bitmaps is to indicate a state of one replica, wherein each of the plurality of bitmaps comprises a set of bits, wherein each bit in the set of bits corresponds to a pending count of updates the one replica missed; updating, by the processing device, a first metadata associated with the first replica to indicate an outcast state of the first replica; checking whether the first replica has a pending lock for a modification process to modify the first replica in view of the second replica; determining that the modification process is still in progress when the first replica has the pending lock; determining that the modification process ended abnormally when the first replica does not have the pending lock and the first metadata indicates the outcast state of the first replica; repairing the first replica from a third replica in view of the determining that the modification process ended abnormally; and updating the first metadata to remove the outcast state of the first replica in response to an indication that the modification process of the first replica is complete or that the first replica has been repaired. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system, comprising:
-
a memory; and a processing device, operatively coupled to the memory, the processing device to; receive an indication that a first replica stored on a first server is to be modified in view of a second replica stored on a second server, wherein the first replica and the second replica are replicas of a same file, wherein the first server comprises metadata for a plurality of replicas including the first replica and the second replica, wherein the metadata comprises a plurality of bitmaps, wherein each of the plurality of bitmaps is to indicate a state of one replica, wherein each of the plurality of bitmaps comprises a set of bits, wherein each bit in the set of bits corresponds to a pending count of updates the one replica missed; update a first metadata associated with the first replica to indicate an outcast state of the first replica; check whether the first replica has a pending lock for a modification process to modify the first replica in view of the second replica; determine that the modification process is still in progress when the first replica has the pending lock; determine that the modification process ended abnormally when the first replica does not have the pending lock and the first metadata indicates the outcast state of the first replica; repair the first replica from a third replica in view of the determination that the modification process ended abnormally; and update the first metadata to remove the outcast state of the first replica in response to an indication that the modification process of the first replica is complete or that the first replica has been repaired. - View Dependent Claims (7, 8, 9)
-
-
10. A non-transitory computer readable storage medium including instructions that, when executed by a processing device, cause the processing device to:
-
receive, by the processing device of a first server, an indication that a first replica stored on the first server is to be modified in view of a second replica stored on a second server, wherein the first replica and the second replica are replicas of a same file, wherein the first server comprises metadata for a plurality of replicas including the first replica and the second replica, wherein the metadata comprises a plurality of bitmaps, wherein each of the plurality of bitmaps is to indicate a state of one replica, wherein each of the plurality of bitmaps comprises a set of bits, wherein each bit in the set of bits corresponds to a pending count of updates the one replica missed; update, by the processing device, a first metadata associated with the first replica to indicate an outcast state of the first replica; check whether the first replica has a pending lock for a modification process to modify the first replica in view of the second replica; determine that the modification process is still in progress when the first replica has the pending lock; determine that the modification process ended abnormally when the first replica does not have the pending lock and the first metadata indicates the outcast state of the first replica; repair the first replica from a third replica in view of the determination that the modification process ended abnormally; and update the first metadata to remove the outcast state of the first replica in response to an indication that the modification process of the first replica is complete or that the first replica has been repaired. - View Dependent Claims (11, 12, 13, 14)
-
Specification