8000 Bug fix/agency restart after compaction and holes in log by kvahed · Pull Request #3413 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Bug fix/agency restart after compaction and holes in log #3413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
both locks need be acquired for setting _confirmed to _commitIndex
  • Loading branch information
kvahed committed Oct 13, 2017
commit 0d705791a5fc8089968275c16c7d4892fa6413a6
1 change: 1 addition & 0 deletions arangod/Agency/Agent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,7 @@ void Agent::lead() {
// Any missing indices before _commitIndex were compacted.
// DO NOT EDIT without understanding the consequences for sendAppendEntries!
CONDITION_LOCKER(guard, _waitForCV);
MUTEX_LOCKER(tiLocker, _tiLock);
for (auto& i : _confirmed) {
if (i.first != id()) {
i.second = _commitIndex;
Expand Down
4 changes: 2 additions & 2 deletions arangod/Agency/Agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ class Agent : public arangodb::Thread,

/// Rules for the locks: This covers the following locks:
/// _ioLock (here)
/// _logLock (in State)
/// _tiLock (here)
/// _logLock (in State) _waiForCV (here)
/// _tiLock (here) _tiLock (here)
/// One may never acquire a log in this list whilst holding another one
/// that appears further down on this list. This is to prevent deadlock.
/// For _logLock: This is local to State and we make sure that the few
Expand Down
0