22 #ifndef Hypertable_RangeServer_GroupCommit_h
23 #define Hypertable_RangeServer_GroupCommit_h
43 bool operator()(
const ClusterTableIdPair &key1,
const ClusterTableIdPair &key2)
const {
44 if (key1.first != key2.first)
46 if (key1.second.id == 0 || key2.second.id == 0) {
47 if (key1.second.id == 0)
51 int cmpval = strcmp(key1.second.id, key2.second.id);
54 return key1.second.generation < key2.second.generation;
86 std::map<ClusterTableIdPair, UpdateRecTable *, lt_ctip>
m_table_map;
91 #endif // Hypertable_RangeServer_GroupCommit_h
uint32_t m_commit_interval
Cached copy of Hypertable.RangeServer.CommitInterval property.
A memory buffer of static size.
virtual void trigger()
Processes queued updates that are ready to be committed.
std::map< ClusterTableIdPair, UpdateRecTable *, lt_ctip > m_table_map
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
The Flyweight string set stores duplicate strings efficiently.
Declarations for RangeServer.
Declarations for GroupCommitInterface.
FlyweightString m_flyweight_strings
String cache for holding table IDs
Comparison functor for ClusterTableIdPair objects.
bool operator()(const ClusterTableIdPair &key1, const ClusterTableIdPair &key2) const
GroupCommit(Apps::RangeServer *range_server)
Constructor.
Apps::RangeServer * m_range_server
Pointer to RangeServer.
virtual void add(EventPtr &event, uint64_t cluster_id, SchemaPtr &schema, const TableIdentifier &table, uint32_t count, StaticBuffer &buffer, uint32_t flags)
Adds a batch of updates to the group commit queue.
std::pair< uint64_t, TableIdentifier > ClusterTableIdPair
Structure for holding cluster ID / table identifier pair.
std::shared_ptr< Schema > SchemaPtr
Smart pointer to Schema.
Abstract base class for group commit implementation.
int m_counter
Trigger iteration counter.
std::mutex m_mutex
Mutex to serialize concurrent access