Commit 40e80ee6 authored by jan.koester's avatar jan.koester
Browse files

test

parent 03746a46
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -413,6 +413,7 @@ void client::store_stripe(uint64_t group_id, uint32_t stripe_index,
        for (size_t i = 0; i < n; i++) {
            if (!pending[i].sent && !pending[i].local) {
                pending[i].fail_reason.clear();
                connections_[i].dead_until = {};
                connections_[i].socket.reset();
                connections_[i].connected = false;
                futures.push_back(std::async(std::launch::async, send_to_node, i));
@@ -876,7 +877,13 @@ void client::store(uint64_t group_id, const uint8_t* data, size_t data_len) {
        } catch (const std::exception& e) {
            if (attempt == 0) {
                DBG_LOG("[PARITY] store attempt 1 failed: " << e.what()
                          << ", retrying (dead nodes already cached)\n");
                          << ", clearing dead marks and retrying\n");
                // Clear dead_until on all nodes so the retry actually reconnects
                for (auto& nc : connections_) {
                    nc.dead_until = {};
                    nc.socket.reset();
                    nc.connected = false;
                }
            } else {
                throw; // second attempt failed, propagate
            }