Commit dd556379 authored by Julien Muchembled's avatar Julien Muchembled

Comment about backup limitations

parent 8832bd42
...@@ -85,6 +85,11 @@ RC - Review output of pylint (CODE) ...@@ -85,6 +85,11 @@ RC - Review output of pylint (CODE)
Currently, storage presence is broadcasted to client nodes too early, as Currently, storage presence is broadcasted to client nodes too early, as
the storage node would refuse them until it has only up-to-date data (not the storage node would refuse them until it has only up-to-date data (not
only up-to-date cells, but also a partition table and node states). only up-to-date cells, but also a partition table and node states).
- In backup mode, 2 simultaneous replication should be possible so that:
- outdated cells does not block backup for too long time
- constantly modified partitions does not prevent outdated cells to
replicate
Current behaviour is undefined and the above 2 scenarios may happen.
- Create a specialized PartitionTable that know the database and replicator - Create a specialized PartitionTable that know the database and replicator
to remove duplicates and remove logic from handlers (CODE) to remove duplicates and remove logic from handlers (CODE)
- Consider insert multiple objects at time in the database, with taking care - Consider insert multiple objects at time in the database, with taking care
......
...@@ -141,6 +141,9 @@ class BackupApplication(object): ...@@ -141,6 +141,9 @@ class BackupApplication(object):
tid = app.backup_tid tid = app.backup_tid
# Wait for non-primary partitions to catch up, # Wait for non-primary partitions to catch up,
# so that all UP_TO_DATE cells are really UP_TO_DATE. # so that all UP_TO_DATE cells are really UP_TO_DATE.
# XXX: Another possibility could be to outdate such cells, and
# they would be quickly updated at the beginning of the
# RUNNING phase. This may simplify code.
# Any unfinished replication from upstream will be truncated. # Any unfinished replication from upstream will be truncated.
while pt.getCheckTid(xrange(pt.getPartitions())) < tid: while pt.getCheckTid(xrange(pt.getPartitions())) < tid:
poll(1) poll(1)
......
...@@ -227,6 +227,8 @@ class Replicator(object): ...@@ -227,6 +227,8 @@ class Replicator(object):
return return
app = self.app app = self.app
# Choose a partition with no unfinished transaction if possible. # Choose a partition with no unfinished transaction if possible.
# XXX: When leaving backup mode, we should only consider UP_TO_DATE
# cells when leaving backup mode.
for offset in self.replicate_dict: for offset in self.replicate_dict:
if not self.partition_dict[offset].max_ttid: if not self.partition_dict[offset].max_ttid:
break break
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment