raft: add explicit raft argument to all functions
All raft functions worked with a global raft object. That would make impossible to move raft to a separate module, where it could be properly unit-tested with multiple raft nodes in each test. The patch adds an explicit raft pointer argument to each raft function as a first part of moving raft to a separate library. The global object is renamed to box_raft_global so as to emphasize this is a global box object, not from the future raft library. Its access now should go through box_raft() function, which will get some sanity checks in the next commit. Part of #5303
Showing
- src/box/applier.cc 3 additions, 3 deletionssrc/box/applier.cc
- src/box/box.cc 16 additions, 14 deletionssrc/box/box.cc
- src/box/lua/info.c 5 additions, 4 deletionssrc/box/lua/info.c
- src/box/memtx_engine.c 2 additions, 2 deletionssrc/box/memtx_engine.c
- src/box/raft.c 325 additions, 299 deletionssrc/box/raft.c
- src/box/raft.h 39 additions, 27 deletionssrc/box/raft.h
Loading
Please register or sign in to comment