Commit 970af1c2 authored by jan.koester's avatar jan.koester
Browse files

test

parent ef7fe1c2
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -12,6 +12,10 @@ authdb (20260414+17) unstable; urgency=medium
    AuthHeader marker) BEFORE calling remove(). Empty or corrupt
    retrieve results no longer trigger remove+store, which was deleting
    valid blocks from healthy nodes.
  * Fix import not persisted after restart: Import now calls flushSync()
    which does a synchronous push to the cluster, ensuring data is
    durably stored before returning the HTTP response. Previously
    pushManifest() was async (queued) and a restart would lose the data.
  * Add regression tests: PrefetchNeverBlocks, RevisionGuardNoDataLoss

 -- Jan Koester <jan.koester@tuxist.de>  Mon, 14 Apr 2026 22:00:00 +0200
+6 −0
Original line number Diff line number Diff line
@@ -663,6 +663,12 @@ namespace authdb {
            json_object_object_add(jobj, "scrub_running",
                json_object_new_boolean(g_Cluster->isScrubRunning()));

            // Pending (non-persistent) async push queue sizes
            json_object_object_add(jobj, "pending_session_pushes",
                json_object_new_int64(static_cast<int64_t>(g_Cluster->pendingSessionPushes())));
            json_object_object_add(jobj, "pending_data_pushes",
                json_object_new_int64(static_cast<int64_t>(g_Cluster->pendingDataPushes())));

            sendJson(curreq, jobj);
            json_object_put(jobj);
        }
+10 −0
Original line number Diff line number Diff line
@@ -236,6 +236,16 @@ namespace authdb {

        bool isScrubRunning() const { return scrub_running_.load(); }

        // Number of pending (not yet durably stored) pushes in the async queues.
        size_t pendingSessionPushes() const {
            std::lock_guard<std::mutex> lk(const_cast<std::mutex&>(push_mutex_));
            return push_queue_.size();
        }
        size_t pendingDataPushes() const {
            std::lock_guard<std::mutex> lk(const_cast<std::mutex&>(push_mutex_));
            return data_push_queue_.size();
        }

        // Signal that all domain backends have been loaded into cache.
        // Scrub will not remove orphaned groups until this is set.
        void setDomainsReady() { domains_ready_ = true; }