Fennel: BTreeRecoveryFactory Class Reference (original) (raw)

Recovers a LogicalTxnParticipant from the log.

Using the classId to determine the participant type to create, the factory reads required constructor parameters from the log input stream. The factory may peool participant instances; i.e. when the same constructor parameters are encountered a second time, the factory can return the same instance. (TODO: refine this when parallelized recovery is implemented.) The implementation must consume ALL log data for this record, even if some of it turns out to be unneeded.

Parameters:

classId the LogicalTxnClassId recorded when the participant was logged while online
logStream the log information written by the participant's describeParticipant() implementation

Returns:

reference to loaded participant

Implements LogicalTxnParticipantFactory.

Definition at line 42 of file BTreeRecoveryFactory.cpp.

References getParticipantClassId(), BTreeDescriptor::keyProjection, TupleProjection::readPersistent(), TupleDescriptor::readPersistent(), ByteInputStream::readValue(), BTreeDescriptor::rootPageId, scratchAccessor, segmentAccessor, BTreeDescriptor::segmentAccessor, BTreeDescriptor::tupleDescriptor, typeFactory, and writerMap.