commit 2dbec574cac34303db2f6f1256a7cd5b8272b0d8
parent 07a374c3d9fc2abf35765876f886bc1165bf5e19
Author: finwo <finwo@pm.me>
Date: Sat, 3 Jan 2026 19:38:57 +0100
2.74
Diffstat:
4 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,6 +1,12 @@
-2.73 Upcoming
+2.74 [KK 2011-04-05]
+- Promoted to STABLE. A word of warning: DOS protection under high
+ load may be unstable, currently under investigation.
+
+2.73 [KK 2011-03-05]
- Removed too much debugging verbosity from socket handling
- Bugfix in basesocket/accept.cc, thanks Mario M. for reporting
+- Change in tcp dispatcher: when the algorithm fails, a new target
+ list is constructed for re-dispatching.
2.72 [KK 2011-01-11]
- Web interface correctly retrieved in "xrctl list" (including the
diff --git a/Makefile b/Makefile
@@ -1,7 +1,7 @@
# Top-level Makefile for XR
# -------------------------
-VER ?= 2.73
+VER ?= 2.74
PREFIX ?= $(DESTDIR)/usr
BINDIR ?= $(PREFIX)/sbin
MANDIR ?= $(PREFIX)/share/man
diff --git a/xr/Dispatchers/tcpdispatcher/dispatch.cc b/xr/Dispatchers/tcpdispatcher/dispatch.cc
@@ -39,6 +39,17 @@ void TcpDispatcher::dispatch() {
if (config.verbose())
msg("Failed to connect to back end " << tb.description() <<
", trying to dispatch to other\n");
+ // Re-evaluate back ends. Something may have come online.
+ msg("Re-creating target list for the TCP dispatcher.\n");
+ targetlist().reset();
+ for (unsigned i = 0; i < balancer.nbackends(); i++)
+ if (balancer.backend(i).available()) {
+ targetlist().add(i);
+ if (config.verbose())
+ msg(" Candidate target: " <<
+ balancer.backend(i).description() << '\n');
+ }
+ // And now fall thru into the next loop run...
} else {
connected = true;
backendfd(tb.sock());
diff --git a/xr/backendvector/backendvector b/xr/backendvector/backendvector
@@ -9,6 +9,8 @@ public:
void add (unsigned nr) { vec.push_back(nr); }
unsigned size() const { return vec.size(); }
unsigned operator[] (unsigned index) const { return vec[index]; }
+ void reset() { vec.clear();
+ is_defined = false; }
private:
vector<unsigned> vec;
bool is_defined;