From 7d4ac70c97fffe7916ef8b8585dd9552c9a59517 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Thu, 12 Apr 2018 20:33:41 +0200 Subject: [PATCH] requeue serial check if NOTIFY comes in while incoming AXFR is ongoing --- pdns/communicator.cc | 11 ++++++++++- pdns/slavecommunicator.cc | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/pdns/communicator.cc b/pdns/communicator.cc index 27d6f3507..e521b5d6e 100644 --- a/pdns/communicator.cc +++ b/pdns/communicator.cc @@ -125,8 +125,17 @@ void CommunicatorClass::mainloop(void) while(time(0) < next) { rc=d_any_sem.tryWait(); - if(rc) + if(rc) { + bool extraSlaveRefresh = false; Utility::sleep(1); + { + Lock l(&d_lock); + if (d_tocheck.size()) + extraSlaveRefresh = true; + } + if (extraSlaveRefresh) + slaveRefresh(&P); + } else { break; // something happened } diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index 37b42de0e..9dd57548b 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -736,8 +736,18 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P) set trysuperdomains; { Lock l(&d_lock); - rdomains.insert(rdomains.end(), d_tocheck.begin(), d_tocheck.end()); - d_tocheck.clear(); + set requeue; + for(const auto& di: d_tocheck) { + if(d_inprogress.count(di.zone)) { + g_log<