17 #ifndef CONSISTENCY_MGR_HPP 18 #define CONSISTENCY_MGR_HPP 38 static CSMgr *Instance_;
40 typedef std::map<DGraph::VDesc, bool>
MapNodes;
45 Instance_ =
new CSMgr();
66 { ExistingRelMap_ = m; }
68 boost::graph_traits<DGraph::DirectedGraph>::vertices_size_type
78 typedef std::pair<LogEntry*, DGraph::VDesc> PendingPair;
79 typedef std::vector<PendingPair> PendingList;
81 typedef std::vector<LogStructure*> LSVec;
82 typedef std::vector<Helper::LogVersions::iterator> LogIterVec;
83 typedef std::map<intptr_t*, bool> Addr2Bool;
84 typedef std::map<LogStructure*, FASection*> FaseMap;
85 typedef std::vector<FASection*> FaseVec;
97 PendingList PendingList_;
100 FaseMap FirstFaseOfHeader_;
108 IsParentDone_{
false},
109 IsInRecovery_{
false},
111 ExistingRelMap_{
nullptr},
113 FirstFaseOfHeader_{},
115 #if defined(_FLUSH_GLOBAL_COMMIT) && !defined(DISABLE_FLUSHES) && \ 116 !defined(_DISABLE_DATA_FLUSH) 119 GlobalFlush_{
nullptr}
125 #if defined(_FLUSH_GLOBAL_COMMIT) && !defined(DISABLE_FLUSHES) && \ 126 !defined(_DISABLE_DATA_FLUSH) 129 GlobalFlush_ =
nullptr;
139 {
return FirstFaseOfHeader_.find(ls) != FirstFaseOfHeader_.end(); }
141 assert(FirstFaseOfHeader_.find(ls) == FirstFaseOfHeader_.end());
142 FirstFaseOfHeader_.insert(std::make_pair(ls, fase));
145 { AllFases_.push_back(fase); }
147 PendingPair pp = std::make_pair(le, nid);
148 PendingList_.push_back(pp);
151 FaseMap::const_iterator ci = FirstFaseOfHeader_.find(ls);
152 if (ci != FirstFaseOfHeader_.end())
return ci->second;
158 bool isFoundInExistingLog(
LogEntry *le, uint64_t gen_num)
const;
159 void removeUnresolvedNodes();
161 void resolvePendingList();
174 void destroyFASections();
178 bool isInRecovery()
const {
return IsInRecovery_; }
179 bool areUserThreadsDone()
const 182 #if defined(_NVM_TRACE) || defined(_NVM_VERBOSE_TRACE) 186 template<
class T>
void traceHelper(T s) {
187 #if defined (_NVM_TRACE) || defined(_NVM_VERBOSE_TRACE) bool is_stable(VDesc vertex) const
Definition: durability_graph.hpp:83
void set_existing_rel_map(Helper::MapLog2Int *m)
Definition: consistency_mgr.hpp:65
void set_is_stable(VDesc vertex, bool b)
Definition: durability_graph.hpp:81
boost::graph_traits< DirectedGraph >::vertex_descriptor VDesc
Definition: durability_graph.hpp:58
Definition: consistency_mgr.hpp:37
boost::graph_traits< DirectedGraph >::vertices_size_type get_num_vertices() const
Definition: durability_graph.hpp:78
Definition: log_structure.hpp:30
std::map< LogEntry *, bool > Log2Bool
Definition: helper.hpp:32
static Helper & getInstance()
Definition: helper.hpp:66
void trace(T s)
Definition: helper.hpp:78
std::vector< LogVer > LogVersions
Definition: helper.hpp:49
void set_is_stable(DGraph::VDesc vertex, bool b)
Definition: consistency_mgr.hpp:71
boost::graph_traits< DGraph::DirectedGraph >::vertices_size_type get_num_graph_vertices() const
Definition: consistency_mgr.hpp:69
std::map< LogEntry *, uint64_t > MapLog2Int
Definition: helper.hpp:50
bool areUserThreadsDone() const
Definition: log_mgr.hpp:154
static CSMgr & createInstance()
Definition: consistency_mgr.hpp:43
static CSMgr & getInstance()
Definition: consistency_mgr.hpp:57
static LogMgr & getInstance()
Definition: log_mgr.hpp:75
Definition: log_structure.hpp:77
std::set< uint64_t > SetOfInts
Definition: util.hpp:77
void doConsistentUpdate(LogStructure *, Helper::LogVersions *, bool is_in_recovery)
Main entry point for a single round of consistent state gen.
Definition: consistency_mgr.cpp:35
bool is_stable(DGraph::VDesc vertex) const
Definition: consistency_mgr.hpp:73
std::map< DGraph::VDesc, bool > MapNodes
Definition: consistency_mgr.hpp:40
void trace()
Definition: durability_graph_builder.cpp:215
static void deleteInstance()
Definition: consistency_mgr.hpp:50
std::vector< LogEntry * > LogEntryVec
Definition: log_mgr.hpp:45
Definition: atlas_alloc_cpp.hpp:21
Definition: durability_graph.hpp:35