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

test

parent dfa7d7d2
Loading
Loading
Loading
Loading
Loading
+1 −0
Changes for data/config.yaml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ AUTHDB:
    MAXCONN: 1024
    CLUSTER:
        ENABLE: "false"
        SSLVERIFY: false
        PATH: "/tmp/cluster.db"
    ADMINDB:
        PATH: "/tmp/admin.db"
+1 −0
Changes for debian/authdb.default-config.yaml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ AUTHDB:
    PATH: "/usr/lib/DEB_HOST_MULTIARCH/authdb"
  CLUSTER:
    ENABLE: "false"
    SSLVERIFY: false
    BIND: "0.0.0.0"
    PORT: 4433
    PATH: "/var/lib/authdb/cluster"
+4 −0
Changes for src/authdb.cpp: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -866,6 +866,10 @@ int main(int argc,char *argv[]){
            ccfg.cert_file = cert;
            ccfg.key_file = key;

            auto *sslVerify = config.getKey("/AUTHDB/CLUSTER/SSLVERIFY");
            if (sslVerify)
                ccfg.tls_verify = config.getValue(sslVerify, 0) == "true";

            auto *authName = config.getKey("/AUTHDB/CLUSTER/AUTH_NAME");
            auto *authKey  = config.getKey("/AUTHDB/CLUSTER/AUTH_KEY");
            if (authName) ccfg.client_name = config.getValue(authName, 0);
+5 −5
Changes for src/cluster.cpp: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -378,7 +378,7 @@ namespace authdb {

            if (!nodes.empty()) {
                pclient_ = std::make_unique<paritypp::client>(
                    cfg_.data_blocks, cfg_.parity_blocks, nodes, pcreds);
                    cfg_.data_blocks, cfg_.parity_blocks, nodes, pcreds, cfg_.tls_verify);
                if (self_idx != SIZE_MAX) {
                    pclient_->set_local_node(self_idx, store_);
                }
@@ -390,7 +390,7 @@ namespace authdb {
                read_clients_.clear();
                for (size_t ci = 0; ci < READ_CLIENT_POOL_SIZE; ++ci) {
                    auto rc = std::make_unique<paritypp::client>(
                        cfg_.data_blocks, cfg_.parity_blocks, nodes, pcreds);
                        cfg_.data_blocks, cfg_.parity_blocks, nodes, pcreds, cfg_.tls_verify);
                    if (self_idx != SIZE_MAX) {
                        rc->set_local_node(self_idx, store_);
                    }
@@ -398,14 +398,14 @@ namespace authdb {
                }
                // Dedicated session write client — used only by push_worker
                session_client_ = std::make_unique<paritypp::client>(
                    cfg_.data_blocks, cfg_.parity_blocks, nodes, pcreds);
                    cfg_.data_blocks, cfg_.parity_blocks, nodes, pcreds, cfg_.tls_verify);
                session_client_->set_store_id(SESSION_STORE_ID);
                if (self_idx != SIZE_MAX) {
                    session_client_->set_local_node(self_idx, session_store_);
                }
                // Dedicated session read client — used by request threads
                session_read_client_ = std::make_unique<paritypp::client>(
                    cfg_.data_blocks, cfg_.parity_blocks, nodes, pcreds);
                    cfg_.data_blocks, cfg_.parity_blocks, nodes, pcreds, cfg_.tls_verify);
                session_read_client_->set_store_id(SESSION_STORE_ID);
                if (self_idx != SIZE_MAX) {
                    session_read_client_->set_local_node(self_idx, session_store_);
@@ -413,7 +413,7 @@ namespace authdb {
                // Dedicated scrub/rebalance client — avoids blocking pclient_
                // (push_worker + health monitor) during long scrub operations
                scrub_client_ = std::make_unique<paritypp::client>(
                    cfg_.data_blocks, cfg_.parity_blocks, nodes, pcreds);
                    cfg_.data_blocks, cfg_.parity_blocks, nodes, pcreds, cfg_.tls_verify);
                if (self_idx != SIZE_MAX) {
                    scrub_client_->set_local_node(self_idx, store_);
                }
+1 −0
Changes for src/cluster.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ namespace authdb {
        int                      port = 4433;
        std::string              cert_file;
        std::string              key_file;
        bool                     tls_verify = false;
        std::string              client_name;
        std::string              client_key;
        std::string              store_path;   // file-backed store directory (empty = memory only)
Loading