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

test

parent 75314290
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
authdb (20260405) unstable; urgency=medium

  * Vacuum cluster block stores on all nodes when cluster mode is active

 -- Jan Koester <jan.koester@tuxist.de>  Sun, 05 Apr 2026 00:00:00 +0200

authdb (20260404+3) unstable; urgency=medium

  * Rebuild against libparitypp 20260404+9 (stripe-based parity, 16KB chunks)
+23 −0
Original line number Diff line number Diff line
@@ -1852,6 +1852,29 @@ namespace authdb {
            json_object_object_add(jobj, "size_before", json_object_new_int64(sizeBefore));
            json_object_object_add(jobj, "size_after", json_object_new_int64(sizeAfter));
            json_object_object_add(jobj, "freed", json_object_new_int64(sizeBefore - sizeAfter));

            // Vacuum cluster block stores when cluster mode is active
            if (g_Cluster && g_Cluster->isRunning()) {
                auto &pclient = g_Cluster->getClient();
                if (pclient) {
                    size_t nodes_ok = 0;
                    try {
                        std::unique_lock<std::timed_mutex> lock(
                            g_Cluster->getClientMutex(), std::try_to_lock);
                        if (lock.owns_lock()) {
                            nodes_ok = pclient->vacuum_all_nodes();
                        }
                    } catch (...) {}
                    json_object_object_add(jobj, "cluster_vacuum",
                                           json_object_new_boolean(true));
                    json_object_object_add(jobj, "cluster_nodes_vacuumed",
                                           json_object_new_int64(static_cast<int64_t>(nodes_ok)));
                } else {
                    json_object_object_add(jobj, "cluster_vacuum",
                                           json_object_new_boolean(false));
                }
            }

            sendJson(curreq, jobj);
            json_object_put(jobj);
        }