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

test

parent 4b6326a0
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ namespace authdb {
        DBG_LOG("[CLUSTER-BE] fetchFromCluster domain=" << _Domain
                  << " buf_size=" << _Buffer.size() << " dirty=" << _Dirty.load() << "\n");

        auto &client = g_Cluster->getClient();
        auto &client = g_Cluster->getReadClient();
        if (!client) return;

        // Single retrieve: manifest contains header + magic + entity keys + full record data
+7 −0
Original line number Diff line number Diff line
@@ -444,6 +444,13 @@ namespace authdb {
                if (self_idx != SIZE_MAX) {
                    pclient_->set_local_node(self_idx, store_);
                }
                // Dedicated read client — separate QUIC connections, never blocked
                // by push_worker's store() holding pclient_->mutex_
                read_client_ = std::make_unique<paritypp::client>(
                    cfg_.data_blocks, cfg_.parity_blocks, nodes, pcreds);
                if (self_idx != SIZE_MAX) {
                    read_client_->set_local_node(self_idx, store_);
                }
                // Dedicated session client — separate connections, no contention with domain fetches
                session_client_ = std::make_unique<paritypp::client>(
                    cfg_.data_blocks, cfg_.parity_blocks, nodes, pcreds);
+5 −0
Original line number Diff line number Diff line
@@ -158,6 +158,7 @@ namespace authdb {
        // Accessors for backend use
        paritypp::block_store &getStore() { return *store_; }
        std::unique_ptr<paritypp::client> &getClient() { return pclient_; }
        std::unique_ptr<paritypp::client> &getReadClient() { return read_client_; }

        // Push a session to the cluster (after local addSession)
        void pushSession(const SessionData &sess);
@@ -273,6 +274,10 @@ namespace authdb {

        std::unique_ptr<paritypp::client> pclient_;

        // Dedicated client for domain data reads — avoids contention with
        // pclient_ which is used by push_worker (store) and health monitor
        std::unique_ptr<paritypp::client> read_client_;

        // Dedicated client for session ops — avoids contention with domain data fetches
        std::unique_ptr<paritypp::client> session_client_;