mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-20 11:45:53 +00:00
Remove useless mutex from BackendInterface and its usage from CassandraBackend (#326)
Fixes #304
This commit is contained in:
@@ -89,9 +89,6 @@ protected:
|
|||||||
std::optional<LedgerRange> range;
|
std::optional<LedgerRange> range;
|
||||||
SimpleCache cache_;
|
SimpleCache cache_;
|
||||||
|
|
||||||
// mutex used for open() and close()
|
|
||||||
mutable std::mutex mutex_;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BackendInterface(boost::json::object const& config)
|
BackendInterface(boost::json::object const& config)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1001,7 +1001,6 @@ CassandraBackend::open(bool readOnly)
|
|||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << "Opening Cassandra Backend";
|
BOOST_LOG_TRIVIAL(info) << "Opening Cassandra Backend";
|
||||||
|
|
||||||
std::lock_guard<std::mutex> lock(mutex_);
|
|
||||||
CassCluster* cluster = cass_cluster_new();
|
CassCluster* cluster = cass_cluster_new();
|
||||||
if (!cluster)
|
if (!cluster)
|
||||||
throw std::runtime_error("nodestore:: Failed to create CassCluster");
|
throw std::runtime_error("nodestore:: Failed to create CassCluster");
|
||||||
|
|||||||
Reference in New Issue
Block a user