[PATCH] Revert "ctdb-daemon: Check packet generation against database generation"
Martin Schwenke
martin at meltin.net
Tue Feb 9 08:31:15 UTC 2016
On Tue, 9 Feb 2016 11:23:55 +1100, Amitay Isaacs <amitay at gmail.com>
wrote:
> 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:
>
> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11707
>
> 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
> 5aab31a39a3589b910a78b96071d6aa5e6547696.
>
> 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.
Reviewed-by: Martin Schwenke <martin at meltin.net>
Pushed...
peace & happiness,
martin
More information about the samba-technical
mailing list