8000 Fix a rare deadlock situation in Replication sync phase (#7759) · HighAvailabilityLab/arangodb@647a29d · GitHub
[go: up one dir, main page]

Skip to content

Commit 647a29d

Browse files
authored
Fix a rare deadlock situation in Replication sync phase (arangodb#7759)
1 parent 489ff0a commit 647a29d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
devel
22
-----
33

4+
* fixed a rare thread local dead lock situation in replication:
5+
If a follower tries to get in sync in the last steps it requires
6+
a lock on master, if he cancels the lock before the master has
7+
succeeded with locking we can end up with one thread beeing deadlocked.
8+
49
* allow usage of floating point values in AQL without leading zeros, e.g.
510
`.1234`. Previous versions of ArangoDB required a leading zero in front of
611
the decimal separator, i.e `0.1234`.

arangod/RestHandler/RestReplicationHandler.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2872,7 +2872,9 @@ bool RestReplicationHandler::isTombstoned(aql::QueryId id) const {
28722872

28732873
void RestReplicationHandler::registerTombstone(aql::QueryId id) const {
28742874
std::string key = IdToTombstoneKey(_vocbase, id);
2875-
WRITE_LOCKER(writeLocker, RestReplicationHandler::_tombLock);
2876-
RestReplicationHandler::_tombstones.emplace(key, std::chrono::steady_clock::now() + RestReplicationHandler::_tombstoneTimeout);
2875+
{
2876+
WRITE_LOCKER(writeLocker, RestReplicationHandler::_tombLock);
2877+
RestReplicationHandler::_tombstones.emplace(key, std::chrono::steady_clock::now() + RestReplicationHandler::_tombstoneTimeout);
2878+
}
28772879
timeoutTombstones();
28782880
}

0 commit comments

Comments
 (0)
0