You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://jira.hyperledger.org/browse/FAB-2484
This fixes the bug described in:
https://jira.hyperledger.org/browse/FAB-2259
Kafka ships with the `unclean.leader.election.enable` setting set to
`true`. For our use case, this default is wrong as it trades consistency
off for availability.
Concretely, consider this worst-case scenario that goes against every
proper practice:
- Two brokers: B0 and B1
- A replication factor of 2
- `min.insync.replicas` set to 1 (the default)
Assume B1 is the partition leader replica (though this doesn't really
matter).
B1 receives a batch of messages from an ordering service node, and
writes them to disk. B0 does the same, replicating B1.
We shut B0 down.
We send a new batch of messages to the cluster (read: B1); B1 writes
them to disk.
We shut B1 down and then bring B0 up.
If we send a new batch of messages to the cluster (read: B0), it will
write them to disk using _re-using (some/all of) the offsets that B1 had
used for its last batch of messages. This means we are rewriting the
blockchain, which is obviously unacceptable.
This changeset prevents this from happening.
Change-Id: Iaa8f8a9fb3a5e001d4deeebcf2774f2a1026855c
Signed-off-by: Kostas Christidis <kostas@christidis.io>
0 commit comments