Appeared in the Proceedings of theSummer USENIX Conference,June 1994, pages 183-195
the primary computing needs of over a dozen users atUCLA for more than three years.Ficus has a general architecture for dealing with fileconflicts. Conflicts are automatically detected and ex-amined to determine if they can also be resolved au-tomatically. Special programs called
resolvers
handleconflicts that can be dealt with automatically.Ficus is able to resolve almost all conflicts for a par-ticularly important class of files—directories. Ficussupports a Unix-style directory system; the semanticsof Unix directories provide that almost every conflictthat can occur in them can be automatically resolved.Directory conflicts could be resolved by submittingthem to a resolver that implements the algorithms nec-essary to resolve their conflicts, but the integrityof theUnix file system is so closely linked to its directoriesthat we have chosen to put the algorithms into Ficusitself.We have instrumented the Ficus system to keeptrack of the number of conflicts generated and howmany conflicts were resolved automatically. This pa-per presents the statistics gathered, which support thecontentionthat,forimportantpatternsofusage, thefre-quency of file conflicts is low enough that optimisticreplication is highly attractive. Further, the statisticsdemonstrate that the use of automatic resolvers is bothpractical and important to reduce the number of con-flicts reported to users.The next section presents an overview of the Ficusfile system. We begin there with an example of howa conflict can arise in an optimisticreplicationsystem,discuss the different kinds of conflicts that can arise,briefly describe how conflicts are detected, and coverother relevant aspects of Ficus. Section 3 describesthe Ficus resolution architecture. It discusses the au-tomated directory conflict resolution mechanisms inFicus and describes how Ficus handles other types of conflicts. Section 4 discusses Ficus conflict resolverprograms. It covers their interface and the various ap-proaches used to resolve conflicts for different typesof files. Section 5 presents conflict data gathered fromFicus; Section 6 discusses some related research. Weclose with a discussion of future work and some con-clusions.
2 Ficus Overview
Ficus is a distributed file system utilizing optimisticreplication[16, 4]. The default synchronizationpolicyprovides
single copy availability
; so long as any copyof a data item is accessible, it may be updated. Oncea single replica has been updated, the system makes abest effort to notify all accessible replicas that a newversionofthefileexistsviaupdate propagation. Thosereplicas then pull over the new data. Ficus guarantees
no lost update
semantics despite this optimistic con-currency control. Conflicting updates are guaranteedto be detected, allowing recovery after the fact.Ficus groups subtrees of files into
volumes
. A vol-ume can be replicated multiple times. A backgroundprocess knownas
reconciliation
runsonbehalf ofeachvolume replica after each reboot and periodically dur-ingnormal operation. It compares all files and directo-riesofthelocal volumereplicawitha remotereplicaof the volume, pullingover missed updates and detectingconcurrent update conflicts.Severaltypesofconflictsarepossible. Theyinclude:
Update/update conflicts
Name conflicts
Remove/update conflictsTheremainderofthissectionwilldiscussthesetypesof conflicts in more detail. The next section describeshow we manage these conflicts.Since single copy availabilitypermits any replica tobe updated, even a simple partitioningof a two-replicafile can result in a conflict. Figure 1 illustrates thissituation. File foo has two replicas in Figure 1a, withreplica 1 at site A and replica 2 at site B. If sites Aand B are partitioned, as Figure 1b shows, updates toboth replicas are accepted. Then, when the partitionis merged, as shown in figure 1c, file foo exists in twoversions. This is an
update/updateconflict
.Directories provide a special case of update/updateconflicts. Partitioned creation of independent files inthe same directory would ordinarily result in an up-date/update conflict on that directory. Since directo-ries are internal to the file system, Ficus automaticallyresolves this sort of concurrent update, producing theunion of all directory changes. (See [6] for a descrip-tion of the algorithms employed in directory manage-ment.) A problem occurs when two files are indepen-dently created with the same name; Unix requires thateach directory entry be unique. We term is kind of directory update/update conflict a
name conflict
.Figure2illustratesadifferentkindofconflict. Infig-ure2a, wesee tworeplicasoffilefoobeforeapartition.In 2b, file foo is removed at site B (indicated by theshading of site B’s replica), while the partitioned rep-lica at site A is updated. When the partitionmerges, asshown in 2c, if no update had occurred, then the otherreplica should simply be removed. However, if theupdated replica is removed in thissituation,the updategenerated during the partitionis lost, possibly withoutthe knowledge of the person making the update. Fi-cus’“nolostupdatesemantics” requiresthattheupdategenerated at site A not be discarded as a result of the
Leave a Comment