21 #include <glog/logging.h>
61 tinyxml2::XMLElement* storages = element->FirstChildElement(kStoragesTagName);
64 LOG(ERROR) <<
"WAIT, the snapshot metadata file doesn't have " << kStoragesTagName
65 <<
" element? that's weird. It'll be treated as empty, but this shouldn't happen!";
81 "This snapshot was taken based on another snapshot that is valid_until this epoch."
82 " If this is the first snapshot, this value is 0.");
84 "This snapshot contains all the logs until this epoch.");
86 "The largest StorageId we so far observed.");
89 tinyxml2::XMLElement* storages = element->GetDocument()->NewElement(kStoragesTagName);
91 element->InsertEndChild(storages);
#define EXTERNALIZE_LOAD_ELEMENT(element, attribute)
Reads a child xml element to load a member variable of this object.
numa_alloc_onnode() and numa_free().
Represents an object that can be written to and read from files/bytes in XML format.
void release_block()
Releases the memory block.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Brings error stacktrace information as return value of functions.
void alloc(uint64_t size, uint64_t alignment, AllocType alloc_type, int numa_node) noexcept
Allocate a memory, releasing the current memory if exists.
static ErrorStack insert_comment(tinyxml2::XMLElement *element, const std::string &comment)
#define CHECK_OUTOFMEMORY(ptr)
This macro checks if ptr is nullptr, and if so exists with kErrorCodeOutofmemory error stack...
const char * kStoragesTagName
Zero is always reserved for invalid epoch.
void * get_block() const
Returns the memory block.
const SnapshotId kNullSnapshotId
uint64_t get_size() const
Returns the byte size of the memory block.
#define CHECK_ERROR(x)
This macro calls x and checks its returned value.
const ErrorStack kRetOk
Normal return value for no-error case.
#define EXTERNALIZE_SAVE_ELEMENT(element, attribute, comment)
Adds an xml element to represent a member variable of this object.
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
A base layout of shared data for all storage types.