A method and system for controlling which content gets precedence and is
replicated. A replica set is comprised of a set of resources. Each
resource is associated with resource data and resource meta-data. For
files-based systems, resource data includes file contents and attributes,
while resource meta-data includes additional attributes that are relevant
for negotiating synchronization during replication. An extra field called
a "fence value" is added to the meta-data associated with each resource.
During synchronization, first fence values are compared. The resource
with the highest fence value includes the content that is controlling and
replicated. If fence values are equal (and greater than a particular
value), the controlling resource is determined based on other meta-data.