mirror of https://gitee.com/bigwinds/arangodb
Minor changes.
This commit is contained in:
parent
0073a86228
commit
0918516e34
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Reference in New Issue