Resolving File Conflicts in the Ficus File System

Resolving File Conflicts in the Ficus File System

To appear, 1994 Summer Usenix Conference. Resolving File Conflicts in the Ficus File System Peter Reiher, John Heidemann, David Ratner, Greg Skinner, Gerald Popek Department of Computer Science University of California, Los Angeles Technical Report CSD-940017 April 1994 Abstract ing can permit conflicting updates to different replicas of a file. Much of the value of replication is based on Ficus is a flexible replication facility with optimistic all replicas being identical, so inconsistent updates are concurrency control designed to span a wide range a potentially serious problem. of scales and network environments. Optimistic con- Early solutions to the problem relied on various con- currency control provides rapid local access and high servative algorithms that prevented conflicting updates availability of files for update in the face of disconnec- to different replicas [1]. These solutions used a wide tion, at the cost of occasional conflicts that are only variety of mechanisms, but their common theme is that discovered when the system is reconnected. Ficus re- they refuse updates that have any possibilityof causing liably detects all possible conflicts. Many conflicts conflicting updates. These solutions trade availability can be automatically resolved by recognizing the file for consistency. When consistency of replicas is of vi- type and understanding the file’s semantics. This pa- tal importance, conservative solutions are preferable. per describes experiences with conflicts and automatic However, experience with file access by typical users conflict resolution in Ficus. It presents data on the fre- has shown that many files are only accessed by a single quency and character of conflicts in our environment. user [10]. Of those that are shared by multiple users, This paper also describes how semantically knowl- few are updated by more than one user. In such en- edgeable resolvers are designed and implemented, and vironments, a mechanism that prevents one user from discusses our experiences with their strengths and lim- updating a file in favor of preserving the update ability itations. We conclude from our experience that opti- of other users who might never generate an update is se- mistic concurrency works well in at least one realistic riously flawed. Conservative replication mechanisms environment, conflicts are rare, and a large proportion exhibit this flaw. of those conflicts that do occur can be automatically solved without human intervention. Optimistic replication mechanisms do not. They al- low any replica of a file to be updated at any time. This choice ensures that users who need to update a 1 Introduction file can do so when any replica is available. However, optimistic mechanisms gain this availability by trad- The value of file replication is widely recognized, but ing off consistency. Since any replica can be updated, replication of updatable files leads immediately to con- two non-communicating replicas can be changed in- sistency problems. File replicas can be partitioned dependently, leading to conflicts, i.e., different replica from each other for a variety of reasons, ranging from contents. To maintain consistency, a system with op- failures of machines and networks to intentionally in- timistic replication must detect and recover from such termittent connections (e.g., connection via modem, or conflicts. replicas on portable machines that are not always at- The improved availability of optimistic systems tached to a network). If no efforts are taken, partition- must be weighed against the frequency and cost of re- This work was sponsored by the Defense Advanced Research covering from conflicts. A hypothesis of this paper is Projects Agency under contract N00174-91-C-0107. Gerald Popek that the cost of optimism is low in many environments. is also affiliated with Locus Computing Corporation. To test this hypothesis, this paper reports conflict The authors can be reached at 4760 Boelter Hall, UCLA, Los An- geles, CA, 90024, or by electronic mail to [email protected]. resolution experiences with Ficus, an optimistic file system developed at UCLA [4]. Ficus has supported the primary computing needs of over a dozen users at replicas then pull over the new data. Ficus guarantees UCLA for more than three years. no lost update semantics despite this optimistic con- Ficus has a general architecture for dealing with file currency control. Conflicting updates are guaranteed conflicts. Conflicts are automatically detected and ex- to be detected, allowing recovery after the fact. amined to determine if they can also be resolved au- Ficus groups subtrees of files into volumes. A vol- tomatically. Special programs called resolvers handle ume can be replicated multiple times. A background conflicts that can be dealt with automatically. process known as reconciliation runs on behalf of each Ficus is able to resolve almost all conflicts for a par- volume replica after each reboot and periodically dur- ticularly important class of files—directories. Ficus ing normal operation. It compares all files and directo- supports a Unix-style directory system; the semantics ries of the local volume replica with a remote replica of of Unix directories provide that almost every conflict the volume, pulling over missed updates and detecting that can occur in them can be automatically resolved. concurrent update conflicts. Directory conflicts could be resolved by submitting Several types of conflicts are possible. They include: them to a resolver that implements the algorithms nec- Update/update conflicts essary to resolve their conflicts, but the integrity of the Unix file system is so closely linked to its directories Name conflicts that we have chosen to put the algorithms into Ficus itself. Remove/update conflicts We have instrumented the Ficus system to keep The remainder of this section willdiscuss these types track of the number of conflicts generated and how of conflicts in more detail. The next section describes many conflicts were resolved automatically. This pa- how we manage these conflicts. per presents the statistics gathered, which support the Since single copy availability permits any replica to contention that, for important patterns of usage, the fre- be updated, even a simple partitioning of a two-replica quency of file conflicts is low enough that optimistic file can result in a conflict. Figure 1 illustrates this replication is highly attractive. Further, the statistics situation. File foo has two replicas in Figure 1a, with demonstrate that the use of automatic resolvers is both replica 1 at site A and replica 2 at site B. If sites A practical and important to reduce the number of con- and B are partitioned, as Figure 1b shows, updates to flicts reported to users. both replicas are accepted. Then, when the partition The next section presents an overview of the Ficus is merged, as shown in figure 1c, file foo exists in two file system. We begin there with an example of how versions. This is an update/update conflict. a conflict can arise in an optimistic replication system, Directories provide a special case of update/update discuss the different kinds of conflicts that can arise, conflicts. Partitioned creation of independent files in briefly describe how conflicts are detected, and cover the same directory would ordinarily result in an up- other relevant aspects of Ficus. Section 3 describes date/update conflict on that directory. Since directo- the Ficus resolution architecture. It discusses the au- ries are internal to the file system, Ficus automatically tomated directory conflict resolution mechanisms in resolves this sort of concurrent update, producing the Ficus and describes how Ficus handles other types of union of all directory changes. (See [6] for a descrip- conflicts. Section 4 discusses Ficus conflict resolver tion of the algorithms employed in directory manage- programs. It covers their interface and the various ap- ment.) A problem occurs when two files are indepen- proaches used to resolve conflicts for different types dently created with the same name; Unix requires that of files. Section 5 presents conflict data gathered from each directory entry be unique. We term is kind of Ficus; Section 6 discusses some related research. We directory update/update conflict a name conflict. close with a discussion of future work and some con- Figure 2 illustrates a different kind of conflict. In fig- clusions. ure 2a, we see two replicas of file foo before a partition. In 2b, file foo is removed at site B (indicated by the 2 Ficus Overview shading of site B’s replica), while the partitioned rep- lica at site A is updated. When the partition merges, as Ficus is a distributed file system utilizing optimistic shown in 2c, if no update had occurred, then the other replication [16, 4]. The default synchronization policy replica should simply be removed. However, if the provides single copy availability; so long as any copy updated replica is removed in this situation, the update of a data item is accessible, it may be updated. Once generated during the partition is lost, possibly without a single replica has been updated, the system makes a the knowledge of the person making the update. Fi- best effort to notify all accessible replicas that a new cus’ “no lost update semantics” requires that the update version of the file exists via update propagation. Those generated at site A not be discarded as a result of the Figure 1: An update/update conflict. removal of the file at site B. This kind of conflict is history of updates to the file. Conflicts are detected called a remove/update conflict. by comparing version vectors from two file replicas. If a file is independently deleted from two replicas Version vectors reliably detect all file conflicts that in- of a partitioned directory, Ficus does not log a conflict. volve replicas of a single file. They do not assist in This delete/delete situation is not a problem, provided ensuring the consistency of updates that span multiple any other replicas of the file are also deleted when the files.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    13 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us