Fennel: LogicalRecoveryLog Class Reference (original) (raw)
LogicalRecoveryLog is the recovery-time counterpart to the online LogicalTxnLog. More...
#include <[LogicalRecoveryLog.h](LogicalRecoveryLog%5F8h-source.html)>
Detailed Description
LogicalRecoveryLog is the recovery-time counterpart to the online LogicalTxnLog.
Definition at line 42 of file LogicalRecoveryLog.h.
Member Typedef Documentation
Constructor & Destructor Documentation
| LogicalRecoveryLog::~LogicalRecoveryLog | ( | | ) | [virtual] | | ---------------------------------------- | - | | - | ----------- |
Member Function Documentation
Definition at line 138 of file LogicalRecoveryLog.cpp.
References LogicalTxnEventMemento::cbActionLast, LogicalTxnSavepoint::cbActionPrev, LogicalTxnSavepoint::cbLogged, SegStreamPosition::cbOffset, LogicalTxnEventMemento::logPosition, LogicalTxnEventMemento::nParticipants, participantFactory, LogicalRecoveryTxn::redoActions(), and LogicalRecoveryTxn::undoActions().
Referenced by recover().
00142 {
00143 LogicalRecoveryTxn recoveryTxn(
00144 pTxnInputStream,
00145 &participantFactory);
00146 FileSize cbRedo;
00147 if (pCheckpointMemento) {
00148 pTxnInputStream->seekSegPos(pCheckpointMemento->logPosition);
00149
00150 LogicalTxnSavepoint svpt;
00151 svpt.cbActionPrev = pCheckpointMemento->cbActionLast;
00152 svpt.cbLogged = pCheckpointMemento->logPosition.cbOffset;
00153 recoveryTxn.undoActions(
00154 svpt,
00155 pCheckpointMemento->nParticipants);
00156
00157 cbRedo = commitMemento.logPosition.cbOffset
00158 - pCheckpointMemento->logPosition.cbOffset;
00159 pTxnInputStream->seekSegPos(pCheckpointMemento->logPosition);
00160 } else {
00161 cbRedo = commitMemento.logPosition.cbOffset;
00162 }
00163 recoveryTxn.redoActions(cbRedo);
00164 }
| std::string LogicalRecoveryLog::getLongLogFileName | ( | TxnId | txnId | ) | [static] |
|---|
Gets the relative filename for a long transaction log.
This is deterministic based on the TxnId.
Parameters:
| txnId | the TxnId of the transaction |
|---|
Definition at line 180 of file LogicalRecoveryLog.cpp.
Referenced by LogicalTxn::LogicalTxn(), and openLongLogStream().
00181 { 00182 std::ostringstream oss; 00183 oss << "txn"; 00184 oss << txnId; 00185 oss << ".dat"; 00186 return oss.str(); 00187 }
Member Data Documentation
The documentation for this class was generated from the following files:
- /home/pub/open/dev/fennel/txn/LogicalRecoveryLog.h
- /home/pub/open/dev/fennel/txn/LogicalRecoveryLog.cpp
