replication: merge replica_by_id into replicaset
For some reason the replica_by_id member (which is an array of pointers) is allocated dynamically. Moreover VCLOCK_MAX = 32 by now and extending it to some new limit will require a way more efforts than just increase the number. Thus reserve memory for replica_by_id inside replicaset statically. This allows to simplify code a bit and drop calloc/free calls. The former code comes from edd76a2a without any explanation why the dynamic member is needed. Acked-by:Konstantin Osipov <kostja.osipov@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com>
Loading
Please register or sign in to comment