Derecho  0.9
Distributed systems toolkit for RDMA
Namespaces | Macros
FilePersistLog.cpp File Reference
#include <derecho/persistent/detail/FilePersistLog.hpp>
#include <derecho/persistent/detail/util.hpp>
#include <derecho/conf/conf.hpp>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <iostream>
#include <string.h>
#include <string>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <experimental/filesystem>
Include dependency graph for FilePersistLog.cpp:

Go to the source code of this file.

Namespaces

 persistent
 This file include all common types internal to derecho and not necessarily being known by a client program.
 

Macros

#define __DO_VALIDATION
 

Macro Definition Documentation

◆ __DO_VALIDATION

#define __DO_VALIDATION
Value:
do { \
if(NUM_FREE_SLOTS < 1) { \
dbg_default_error("{0}-append exception no free slots in log! NUM_FREE_SLOTS={1}", \
this->m_sName, NUM_FREE_SLOTS); \
dbg_default_flush(); \
FPL_UNLOCK; \
std::cerr << "PERSIST_EXP_NOSPACE_LOG: FREESLOT=" << NUM_FREE_SLOTS << ",version=" << ver << std::endl; \
} \
if(NUM_FREE_BYTES < size) { \
dbg_default_error("{0}-append exception no space for data: NUM_FREE_BYTES={1}, size={2}", \
this->m_sName, NUM_FREE_BYTES, size); \
dbg_default_flush(); \
FPL_UNLOCK; \
std::cerr << "PERSIST_EXP_NOSPACE_DATA: FREE:" << NUM_FREE_BYTES << ",size=" << size << std::endl; \
} \
if((CURR_LOG_IDX != -1) && (META_HEADER->fields.ver >= ver)) { \
int64_t cver = META_HEADER->fields.ver; \
dbg_default_error("{0}-append version already exists! cur_ver:{1} new_ver:{2}", this->m_sName, \
(int64_t)cver, (int64_t)ver); \
dbg_default_flush(); \
FPL_UNLOCK; \
std::cerr << "PERSIST_EXP_INV_VERSION:cver=" << cver << ",ver=" << ver << std::endl; \
} \
} while(0)
#define CURR_LOG_IDX
#define PERSIST_EXP_NOSPACE_LOG
#define NUM_FREE_BYTES
#define PERSIST_EXP_NOSPACE_DATA
#define META_HEADER
#define PERSIST_EXP_INV_VERSION
#define NUM_FREE_SLOTS