replication: gather all replicaset variables in struct
There is already a handful of global variables describing the replica set state and there is going to be more so let's consolidate them in a singleton struct: replicaset => replicaset.hash replica_pool => replicaset.pool anon_replicas => replicaset.anon replicaset_vclock => replicaset.vclock While we are at it, let's also move INSTANCE_UUID definition from xrow.c to replication.cc, where it truly belongs. The only reason I see for it to be defined in xrow.c is to compile vinyl unit tests without linking replication.o, but we can easily circumvent this by defining INSTANCE_UUID in vy_iterators_helpers.c. Suggested by @kostja
Showing
- src/box/applier.cc 7 additions, 7 deletionssrc/box/applier.cc
- src/box/box.cc 5 additions, 5 deletionssrc/box/box.cc
- src/box/lua/info.c 4 additions, 4 deletionssrc/box/lua/info.c
- src/box/relay.cc 1 addition, 1 deletionsrc/box/relay.cc
- src/box/replication.cc 44 additions, 57 deletionssrc/box/replication.cc
- src/box/replication.h 33 additions, 9 deletionssrc/box/replication.h
- src/box/wal.cc 3 additions, 3 deletionssrc/box/wal.cc
- src/box/xrow.c 0 additions, 5 deletionssrc/box/xrow.c
- test/unit/vy_iterators_helper.c 3 additions, 0 deletionstest/unit/vy_iterators_helper.c
Loading
Please register or sign in to comment