Loading src/backends/cluster.cpp +10 −4 Changes for src/backends/cluster.cpp: 10 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -78,16 +78,22 @@ namespace authdb { } void ClusterBackend::pushToCluster() { if (!g_Cluster || !g_Cluster->isRunning()) if (!g_Cluster || !g_Cluster->isRunning()) { std::cerr << "ClusterBackend::pushToCluster: cluster not available" << std::endl; return; if (!_Dirty) } if (!_Dirty) { return; } uint64_t dgid = domainGroupId(); // Store in local memory_block_store for peers // Store in local block store (file or memory backed) auto &store = g_Cluster->getStore(); store.store(dgid, 0, _Buffer.data(), _Buffer.size()); if (!store.store(dgid, 0, _Buffer.data(), _Buffer.size())) { std::cerr << "ClusterBackend::pushToCluster: store.store() failed for group " << std::hex << dgid << std::dec << std::endl; } // Distribute to peers with parity encoding auto &client = g_Cluster->getClient(); Loading src/cluster.cpp +2 −0 Changes for src/cluster.cpp: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -175,8 +175,10 @@ namespace authdb { // Setup local block store — file-backed if path configured, otherwise memory if (!cfg_.store_path.empty()) { std::cerr << "Cluster: using file_block_store at " << cfg_.store_path << std::endl; store_ = std::make_shared<paritypp::file_block_store>(cfg_.store_path); } else { std::cerr << "Cluster: using memory_block_store (no PATH configured)" << std::endl; store_ = std::make_shared<paritypp::memory_block_store>(); } Loading test/docker/config-node1.yaml +1 −0 Changes for test/docker/config-node1.yaml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ AUTHDB: ENABLE: "true" BIND: "0.0.0.0" PORT: 4433 PATH: "/var/lib/authdb/cluster" AUTH_NAME: "cluster" AUTH_KEY: "testclusterkey123" DATA_BLOCKS: 2 Loading test/docker/config-node2.yaml +1 −0 Changes for test/docker/config-node2.yaml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ AUTHDB: ENABLE: "true" BIND: "0.0.0.0" PORT: 4433 PATH: "/var/lib/authdb/cluster" AUTH_NAME: "cluster" AUTH_KEY: "testclusterkey123" DATA_BLOCKS: 2 Loading test/docker/config-node3.yaml +1 −0 Changes for test/docker/config-node3.yaml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ AUTHDB: ENABLE: "true" BIND: "0.0.0.0" PORT: 4433 PATH: "/var/lib/authdb/cluster" AUTH_NAME: "cluster" AUTH_KEY: "testclusterkey123" DATA_BLOCKS: 2 Loading Loading
src/backends/cluster.cpp +10 −4 Changes for src/backends/cluster.cpp: 10 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -78,16 +78,22 @@ namespace authdb { } void ClusterBackend::pushToCluster() { if (!g_Cluster || !g_Cluster->isRunning()) if (!g_Cluster || !g_Cluster->isRunning()) { std::cerr << "ClusterBackend::pushToCluster: cluster not available" << std::endl; return; if (!_Dirty) } if (!_Dirty) { return; } uint64_t dgid = domainGroupId(); // Store in local memory_block_store for peers // Store in local block store (file or memory backed) auto &store = g_Cluster->getStore(); store.store(dgid, 0, _Buffer.data(), _Buffer.size()); if (!store.store(dgid, 0, _Buffer.data(), _Buffer.size())) { std::cerr << "ClusterBackend::pushToCluster: store.store() failed for group " << std::hex << dgid << std::dec << std::endl; } // Distribute to peers with parity encoding auto &client = g_Cluster->getClient(); Loading
src/cluster.cpp +2 −0 Changes for src/cluster.cpp: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -175,8 +175,10 @@ namespace authdb { // Setup local block store — file-backed if path configured, otherwise memory if (!cfg_.store_path.empty()) { std::cerr << "Cluster: using file_block_store at " << cfg_.store_path << std::endl; store_ = std::make_shared<paritypp::file_block_store>(cfg_.store_path); } else { std::cerr << "Cluster: using memory_block_store (no PATH configured)" << std::endl; store_ = std::make_shared<paritypp::memory_block_store>(); } Loading
test/docker/config-node1.yaml +1 −0 Changes for test/docker/config-node1.yaml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ AUTHDB: ENABLE: "true" BIND: "0.0.0.0" PORT: 4433 PATH: "/var/lib/authdb/cluster" AUTH_NAME: "cluster" AUTH_KEY: "testclusterkey123" DATA_BLOCKS: 2 Loading
test/docker/config-node2.yaml +1 −0 Changes for test/docker/config-node2.yaml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ AUTHDB: ENABLE: "true" BIND: "0.0.0.0" PORT: 4433 PATH: "/var/lib/authdb/cluster" AUTH_NAME: "cluster" AUTH_KEY: "testclusterkey123" DATA_BLOCKS: 2 Loading
test/docker/config-node3.yaml +1 −0 Changes for test/docker/config-node3.yaml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ AUTHDB: ENABLE: "true" BIND: "0.0.0.0" PORT: 4433 PATH: "/var/lib/authdb/cluster" AUTH_NAME: "cluster" AUTH_KEY: "testclusterkey123" DATA_BLOCKS: 2 Loading