[PATCH] Revert "ctdb-daemon: Check packet generation against database generation"
amitay at gmail.com
Tue Feb 9 00:23:55 UTC 2016
This revert avoids the race condition where dmaster packets are processed
during recovery. This causes ctdbd to abort due to miscalculation of
lmaster since vnnmap has been updated.
Here are the details from commit message:
The checks against database generation are not required since
the global generation is updated as part of updating vnnmap
before the actual database recovery. This change was done in
Checking only against the database generation is incomplete. It can
cause CTDB to abort if the following sequence of events happen.
- CTDB gets REQ_DMASTER packet (gen1)
This packet processing gets deferred to get a record lock
- CTDB goes into recovery, marks RECOVERY_ACTIVE
CTDB recovery helper updates vnnmap (gen2)
- CTDB processes REQ_DMASTER packet (gen1)
The check against database generation (gen1) succeeds.
The check for lmaster is now invalid because VNNMAP has changed.
This will cause CTDB to abort due to protocol error.
Reverting the patch stops processing packets of older generation before
they get into call processing.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7188 bytes
Desc: not available
More information about the samba-technical