Backend state not restored from recovery log with non-distributed virtual 
databases
-----------------------------------------------------------------------------------

         Key: SEQUOIA-1051
         URL: https://forge.continuent.org/jira/browse/SEQUOIA-1051
     Project: Sequoia
        Type: Bug

  Components: Core  
    Versions: Sequoia 2.10.9, Sequoia 2.10.8, Sequoia 2.10.7, Sequoia 2.10.6, 
Sequoia 2.10.5, Sequoia 3.0 beta2, Sequoia 2.10.4, Sequoia 2.10.3, Sequoia 3.0 
beta1, Sequoia 2.10.2, Sequoia 2.10.1, Sequoia 2.10, Sequoia 2.9    
 Environment: Any non-distributed virtual database with recovery log
    Reporter: Emmanuel Cecchet
 Assigned to: Emmanuel Cecchet 
    Priority: Critical
     Fix For: sequoia 2.10.10


When a non-distributed virtual database is used, 
RequestManager.initBackendsLastKnownCheckpointFromRecoveryLog(); is never 
called and backend state is never restored from the recovery log.
This method is only called from DistributedVirtualDatabase.joinGroup().
The following patch fixes the issue. As a side note, the current code generates 
a NPE if no recovery log is defined. The patch fixes that as well.

Current code:
          RecoveryLog recoveryLog = currentVirtualDatabase.getRequestManager()
              .getRecoveryLog();
          if (initialize)
          {
            recoveryLog.resetRecoveryLog(true);
            recoveryLog.setLastManDown();
          }
          if (forceload)
          {
            recoveryLog.clearLastManDown();
            recoveryLog.setLastManDown();
          }
          if (currentVirtualDatabase instanceof DistributedVirtualDatabase)
            ((DistributedVirtualDatabase) currentVirtualDatabase)
                .joinGroup(true);


Proposed patched code:
          if (recoveryLog != null)
          {
            if (initialize)
            {
              recoveryLog.resetRecoveryLog(true);
              recoveryLog.setLastManDown();
            }
            if (forceload)
            {
              recoveryLog.clearLastManDown();
              recoveryLog.setLastManDown();
            }
          }
          if (currentVirtualDatabase instanceof DistributedVirtualDatabase)
            ((DistributedVirtualDatabase) currentVirtualDatabase)
                .joinGroup(true);
          else
            currentVirtualDatabase.getRequestManager()
                .initBackendsLastKnownCheckpointFromRecoveryLog();


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to