Closed davebryson closed 2 years ago
Leveldb is used by our raft log implementation. Since the 2PC shard is a raft replicated service leveldb is a dependency.
We implement the interface nuraft::log_store
using leveldb here: https://github.com/mit-dci/opencbdc-tx/blob/ef541b5ecf2c851863ec44fdcfa7f0fc0da31ba2/src/util/raft/log_store.hpp#L17
Moving upwards in the stack, cbdc::raft::log_store
is used by cbdc::raft::state_manager
(our implementation of the interface nuraft::state_mgr
) here: https://github.com/mit-dci/opencbdc-tx/blob/ef541b5ecf2c851863ec44fdcfa7f0fc0da31ba2/src/util/raft/state_manager.hpp#L54
State manager provided to NuRaft in cbdc::raft::node
: https://github.com/mit-dci/opencbdc-tx/blob/ef541b5ecf2c851863ec44fdcfa7f0fc0da31ba2/src/util/raft/node.cpp#L47
cbdc::raft::node
used to provide replication in cbdc::locking_shard::controller
: https://github.com/mit-dci/opencbdc-tx/blob/ef541b5ecf2c851863ec44fdcfa7f0fc0da31ba2/src/uhs/twophase/locking_shard/controller.hpp#L57
Finally the shard controller is used in the locking_shardd
binary: https://github.com/mit-dci/opencbdc-tx/blob/ef541b5ecf2c851863ec44fdcfa7f0fc0da31ba2/src/uhs/twophase/locking_shard/locking_shardd.cpp#L48
@davebryson do you have any follow-up or further questions on this, or is it ready to close?
No it can be closed. Thank you
Affected Branch
trunk
Basic Diagnostics
[X] I've pulled the latest changes on the affected branch and the issue is still present.
[X] The issue is reproducible in docker
Description
The 2pc locking shard includes leveldb as a dependency. https://github.com/mit-dci/opencbdc-tx/blob/trunk/src/uhs/twophase/locking_shard/locking_shard.hpp#L20. But it doesn't look like leveldb is actually being used.
Removing the include from
locking_shard.hpp
builds without errors. However removing leveldb from CMakeLists.txt: https://github.com/mit-dci/opencbdc-tx/blob/trunk/src/uhs/twophase/locking_shard/CMakeLists.txt#L23 results in build errors. This has been confirmed by @HalosGhostCode of Conduct