Commit 77b40ba1 authored by jan.koester's avatar jan.koester
Browse files

test

parent 28927661
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
mediadb (20260419+24) unstable; urgency=critical

  * Fix broken cluster fetch and index replication operations on startup: Add 
    re-wärmup fallback routine to both `fetch()` & `fetch_range()` exceptions 
    in Cluster object to recover lost connections from unexpected timeouts / 
    forks ("stripe 0 not found", "index fetch failed").
    
 -- Jan Koester <jan.koester@tuxist.de>  Sun, 19 Apr 2026 13:00:00 +0200

mediadb (20260419+23) unstable; urgency=critical

  * Fix Cluster Media Import: Always upload media data blobs ("media:<id>") to 
+40 −0
Original line number Diff line number Diff line
@@ -255,9 +255,19 @@ bool Cluster::fetch(const std::string& key, std::vector<uint8_t>& out) {
        } catch (const netplus::NetException& e) {
            std::cerr << "[CLUSTER] fetch read_client NetException key=" << key
                      << " gid=" << gid << ": " << e.what() << "\n";
            try {
                read_client_->warmup();
                out = read_client_->retrieve(gid);
                if (!out.empty()) return true;
            } catch (...) {}
        } catch (const std::exception& e) {
            std::cerr << "[CLUSTER] fetch read_client exception key=" << key
                      << " gid=" << gid << ": " << e.what() << "\n";
            try {
                read_client_->warmup();
                out = read_client_->retrieve(gid);
                if (!out.empty()) return true;
            } catch (...) {}
        }
    }

@@ -274,9 +284,19 @@ bool Cluster::fetch(const std::string& key, std::vector<uint8_t>& out) {
        } catch (const netplus::NetException& e) {
            std::cerr << "[CLUSTER] fetch pclient NetException key=" << key
                      << " gid=" << gid << ": " << e.what() << "\n";
            try {
                pclient_->warmup();
                out = pclient_->retrieve(gid);
                if (!out.empty()) return true;
            } catch (...) {}
        } catch (const std::exception& e) {
            std::cerr << "[CLUSTER] fetch pclient exception key=" << key
                      << " gid=" << gid << ": " << e.what() << "\n";
            try {
                pclient_->warmup();
                out = pclient_->retrieve(gid);
                if (!out.empty()) return true;
            } catch (...) {}
        }
    }

@@ -294,9 +314,19 @@ bool Cluster::fetch_range(const std::string& key, uint64_t offset, uint64_t leng
        } catch (const netplus::NetException& e) {
            std::cerr << "[CLUSTER] fetch_range read_client NetException key=" << key
                      << " gid=" << gid << ": " << e.what() << "\n";
            try {
                read_client_->warmup();
                out = read_client_->retrieve_range(gid, offset, length);
                if (!out.empty()) return true;
            } catch (...) {}
        } catch (const std::exception& e) {
            std::cerr << "[CLUSTER] fetch_range read_client exception key=" << key
                      << " gid=" << gid << ": " << e.what() << "\n";
            try {
                read_client_->warmup();
                out = read_client_->retrieve_range(gid, offset, length);
                if (!out.empty()) return true;
            } catch (...) {}
        }
    }

@@ -307,9 +337,19 @@ bool Cluster::fetch_range(const std::string& key, uint64_t offset, uint64_t leng
        } catch (const netplus::NetException& e) {
            std::cerr << "[CLUSTER] fetch_range pclient NetException key=" << key
                      << " gid=" << gid << ": " << e.what() << "\n";
            try {
                pclient_->warmup();
                out = pclient_->retrieve_range(gid, offset, length);
                if (!out.empty()) return true;
            } catch (...) {}
        } catch (const std::exception& e) {
            std::cerr << "[CLUSTER] fetch_range pclient exception key=" << key
                      << " gid=" << gid << ": " << e.what() << "\n";
            try {
                pclient_->warmup();
                out = pclient_->retrieve_range(gid, offset, length);
                if (!out.empty()) return true;
            } catch (...) {}
        }
    }