Commit b2e48983 authored by jan.koester's avatar jan.koester
Browse files

test

parent b2e2b3fe
Loading
Loading
Loading
Loading
Loading
+4 −0
Changes for src/backends/cluster.cpp: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -224,10 +224,14 @@ namespace authdb {
    }

    void ClusterBackend::lock() {
        // Network I/O: fetch latest data from cluster peers.
        // _BufMtx serializes concurrent fetch/push so _Buffer is safe.
        std::lock_guard<std::mutex> guard(_BufMtx);
        fetchFromCluster();
    }

    void ClusterBackend::unlock() {
        std::lock_guard<std::mutex> guard(_BufMtx);
        pushToCluster();
    }

+1 −0
Changes for src/backends/cluster.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -71,5 +71,6 @@ namespace authdb {
        size_t                   _Pos;
        bool                     _Dirty;
        std::chrono::steady_clock::time_point _LastPeerFetch{};
        std::mutex               _BufMtx;
    };
};