Drizzled Public API Documentation

transaction_log_reader.cc File Reference

#include <config.h>
#include <fcntl.h>
#include <climits>
#include <cerrno>
#include <cstdio>
#include "transaction_log_reader.h"
#include "transaction_log.h"
#include <drizzled/gettext.h>
#include <drizzled/message/transaction.pb.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <google/protobuf/io/coded_stream.h>
#include <drizzled/algorithm/crc32.h>
#include <drizzled/errmsg_print.h>
#include <drizzled/definitions.h>

Go to the source code of this file.


Detailed Description

Implementation of a transaction reader for the transaction log.

This is currently an extremely simple implementation which reads through the transaction log file one message at a time, using the length-coded bytes to skip through the log. Once it finds the message which corresponds to the transaction id the caller to read() is looking for, it copies the message into the supplied pointer and returns true.

Todo:

Cache offsets so that readers don't have to continually scan through the log file(s)

Definition in file transaction_log_reader.cc.