Dealing with Data Inconsistencies in GFS
Explore how Google File System addresses data inconsistencies caused by concurrent writes, disk failures, and replication issues. Understand application strategies for avoiding undefined regions, GFS mechanisms for detecting stale replicas using versioning, and how checksums help identify corrupted data. This lesson helps you grasp fault tolerance techniques crucial for maintaining data integrity in distributed file systems.
Inconsistencies dealt with by applications
In the previous lesson, we saw the states of file regions after data mutations (random write/record appends). In some cases, the file region becomes undefined or inconsistent. Let’s look at how the applications using GFS deal with these cases.
Undefined regions
Undefined regions are produced due to the concurrent execution of random write operations on the overlapping region. GFS doesn't serialize concurrent writes. Applications that want to use random writes need to be wary of conflicting regions. There can be many ways to avoid undefined regions at the application level. One way is to serialize the concurrent random writes at the same offset at the application level and always write the same length records so that one write operation completely overwrites the previous write (to avoid mixing data from multiple writes producing undefined regions). Otherwise, concurrent writes can be applied to ...