• Julien Muchembled's avatar
    Add test showing that clients may be stuck on an old snapshot in case of failure during tpc_finish · fd4cfaa9
    Julien Muchembled authored
    If anything wrong happens after a transaction is locked and before the end of
    onTransactionCommitted, recovery phase should be run again, so that the master
    gets correct last tid.
    
    Following patch by Vincent is an attempt to fix this:
    
    --- a/neo/master/app.py
    +++ b/neo/master/app.py
    @@ -329,8 +329,8 @@ def playPrimaryRole(self):
    
             # recover the cluster status at startup
             try:
    -            self.runManager(RecoveryManager)
                 while True:
    +                self.runManager(RecoveryManager)
                     self.runManager(VerificationManager)
                     try:
                         if self.backup_tid:
    @@ -338,10 +338,6 @@ def playPrimaryRole(self):
                                 raise RuntimeError("No upstream cluster to backup"
                                                    " defined in configuration")
                             self.backup_app.provideService()
    -                        # Reset connection with storages (and go through a
    -                        # recovery phase) when leaving backup mode in order
    -                        # to get correct last oid/tid.
    -                        self.runManager(RecoveryManager)
                             continue
                         self.provideService()
                     except OperationFailure:
    fd4cfaa9
Name
Last commit
Last update
neo Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
BUGS Loading commit data...
CHANGES Loading commit data...
COPYING Loading commit data...
MANIFEST.in Loading commit data...
README Loading commit data...
TESTS.txt Loading commit data...
TODO Loading commit data...
UPGRADE Loading commit data...
ZODB3.patch Loading commit data...
neo.conf Loading commit data...
neoadmin Loading commit data...
neoctl Loading commit data...
neolog Loading commit data...
neomaster Loading commit data...
neomigrate Loading commit data...
neostorage Loading commit data...
setup.py Loading commit data...