1
0
Fork 0

Minor changes.

This commit is contained in:
Max Neunhoeffer 2016-04-15 12:27:35 +02:00
parent 0073a86228
commit 0918516e34
2 changed files with 4 additions and 7 deletions

View File

@ -138,7 +138,6 @@ bool Agent::waitFor (index_t index, double timeout) {
// Wait until woken up through AgentCallback
while (true) {
std::cout << _last_commit_index << std::endl;
/// success?
if (_last_commit_index >= index) {
return true;
@ -337,11 +336,11 @@ write_ret_t Agent::write (query_t const& query) {
MUTEX_LOCKER(mutexLocker, _ioLock);
applied = _spearhead.apply(query); // Apply to spearhead
indices = _state.log (query, applied, term(), id()); // Log w/ indicies
if (!indices.empty()) {
maxind = *std::max_element(indices.begin(), indices.end());
}
_cv.signal(); // Wake up run
}
if (!indices.empty()) {
maxind = *std::max_element(indices.begin(), indices.end());
}
_cv.signal(); // Wake up run
reportIn(id(),maxind);

View File

@ -159,8 +159,6 @@ public:
std::atomic<index_t> _last_commit_index; /**< @brief Last commit index */
arangodb::Mutex _uncommitedLock; /**< @brief */
Store _spearhead; /**< @brief Spearhead key value store */
Store _read_db; /**< @brief Read key value store */