diff --git a/[refs] b/[refs] index 66780c232f560..bd0c01d0d7260 100644 --- a/[refs] +++ b/[refs] @@ -1,3 +1,3 @@ --- refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e -"refs/heads/CMSSW_7_1_X": 133d805239a808ba5529512d68414df5a85ce3a5 +"refs/heads/CMSSW_7_1_X": f3db95910c85c5f3c9cf5088c8a5cdece36cb8d5 diff --git a/trunk/DQMServices/Core/interface/DQMNet.h b/trunk/DQMServices/Core/interface/DQMNet.h index 4edd3ab66a95d..23a962d191cf3 100644 --- a/trunk/DQMServices/Core/interface/DQMNet.h +++ b/trunk/DQMServices/Core/interface/DQMNet.h @@ -436,9 +436,6 @@ class DQMImplNet : public DQMNet virtual void purgeDeadObjects(Peer *p) { - uint64_t minreq - = (lat::Time::current() - - lat::TimeSpan(0, 0, 5 /* minutes */, 0, 0)).ns(); ImplPeer *ip = static_cast(p); typename ObjectMap::iterator i, e; for (i = ip->objs.begin(), e = ip->objs.end(); i != e; ) @@ -446,11 +443,7 @@ class DQMImplNet : public DQMNet if (i->flags & DQM_PROP_DEAD) ip->objs.erase(i++); else - { - if (i->lastreq && i->lastreq < minreq) - const_cast(*i).lastreq = 0; ++i; - } } } @@ -503,11 +496,16 @@ class DQMImplNet : public DQMNet { typename PeerMap::iterator pi, pe; typename ObjectMap::iterator oi, oe; - uint32_t numobjs = 0; + size_t size = 0; + size_t numobjs = 0; for (pi = peers_.begin(), pe = peers_.end(); pi != pe; ++pi) - numobjs += pi->second.objs.size(); + for (oi = pi->second.objs.begin(), oe = pi->second.objs.end(); oi != oe; ++oi, ++numobjs) + if (all || (oi->flags & DQM_PROP_NEW)) + size += 9*sizeof(uint32_t) + oi->dirname->size() + + oi->objname.size() + 1 + oi->scalar.size() + oi->qdata.size() + + (oi->lastreq > 0 ? oi->rawdata.size() : 0); - msg->data.reserve(msg->data.size() + 300*numobjs); + msg->data.reserve(msg->data.size() + size + 8 * sizeof(uint32_t)); uint32_t nupdates = 0; uint32_t words [4]; @@ -535,7 +533,11 @@ class DQMImplNet : public DQMNet virtual void sendObjectListToPeers(bool all) { + uint64_t minreq + = (lat::Time::current() + - lat::TimeSpan(0, 0, 5 /* minutes */, 0, 0)).ns(); typename PeerMap::iterator i, e; + typename ObjectMap::iterator oi, oe; for (i = peers_.begin(), e = peers_.end(); i != e; ++i) { ImplPeer &p = i->second; @@ -549,6 +551,9 @@ class DQMImplNet : public DQMNet Bucket msg; msg.next = 0; sendObjectListToPeer(&msg, !p.updated || all, true); + for (oi = p.objs.begin(), oe = p.objs.end(); oi != oe; ++oi) + if (oi->lastreq && oi->lastreq < minreq) + const_cast(*oi).lastreq = 0; if (! msg.data.empty()) { diff --git a/trunk/DQMServices/Core/src/DQMNet.cc b/trunk/DQMServices/Core/src/DQMNet.cc index 184ff20ed7a18..1e9cd4d93e27a 100644 --- a/trunk/DQMServices/Core/src/DQMNet.cc +++ b/trunk/DQMServices/Core/src/DQMNet.cc @@ -475,7 +475,7 @@ DQMNet::onMessage(Bucket *msg, Peer *p, unsigned char *data, size_t len) if (debug_) logme() << "DEBUG: received message 'UPDATE ME' from peer " - << p->peeraddr << std::endl; + << p->peeraddr << ", size " << len << std::endl; p->update = true; } @@ -486,7 +486,7 @@ DQMNet::onMessage(Bucket *msg, Peer *p, unsigned char *data, size_t len) if (debug_) logme() << "DEBUG: received message 'LIST OBJECTS' from peer " - << p->peeraddr << std::endl; + << p->peeraddr << ", size " << len << std::endl; // Send over current status: list of known objects. sendObjectListToPeer(msg, true, false); @@ -498,7 +498,7 @@ DQMNet::onMessage(Bucket *msg, Peer *p, unsigned char *data, size_t len) if (debug_) logme() << "DEBUG: received message 'GET OBJECT' from peer " - << p->peeraddr << std::endl; + << p->peeraddr << ", size " << len << std::endl; if (len < 3*sizeof(uint32_t)) { @@ -564,7 +564,8 @@ DQMNet::onMessage(Bucket *msg, Peer *p, unsigned char *data, size_t len) logme() << "DEBUG: received message 'LIST BEGIN " << (flags ? "FULL" : "INCREMENTAL") - << "' from " << p->peeraddr << std::endl; + << "' from " << p->peeraddr + << ", size " << len << std::endl; // If we are about to receive a full list of objects, flag all // objects as possibly dead. Subsequent object notifications @@ -602,7 +603,8 @@ DQMNet::onMessage(Bucket *msg, Peer *p, unsigned char *data, size_t len) logme() << "DEBUG: received message 'LIST END " << (flags ? "FULL" : "INCREMENTAL") - << "' from " << p->peeraddr << std::endl; + << "' from " << p->peeraddr + << ", size " << len << std::endl; // Indicate we have received another update from this peer. // Also indicate we should flush to our clients. @@ -650,7 +652,8 @@ DQMNet::onMessage(Bucket *msg, Peer *p, unsigned char *data, size_t len) if (debug_) logme() << "DEBUG: received message 'OBJECT " << name - << "' from " << p->peeraddr << std::endl; + << "' from " << p->peeraddr + << ", size " << len << std::endl; // Mark the peer as a known object source. p->source = true; @@ -710,14 +713,13 @@ DQMNet::onMessage(Bucket *msg, Peer *p, unsigned char *data, size_t len) } unsigned char *namedata = data + sizeof(words); - unsigned char *enddata = namedata + namelen; - std::string name ((char *) namedata, namelen); - assert (enddata == data + len); + std::string name((char *) namedata, namelen); if (debug_) logme() << "DEBUG: received message 'NONE " << name - << "' from " << p->peeraddr << std::endl; + << "' from " << p->peeraddr + << ", size " << len << std::endl; // Mark the peer as a known object source. p->source = true; diff --git a/trunk/DQMServices/Core/src/DQMService.cc b/trunk/DQMServices/Core/src/DQMService.cc index fb89671a8d945..ffec93087031a 100644 --- a/trunk/DQMServices/Core/src/DQMService.cc +++ b/trunk/DQMServices/Core/src/DQMService.cc @@ -142,6 +142,7 @@ DQMService::flush(const edm::Event &, const edm::EventSetup &) if (! me.wasUpdated()) continue; + o.lastreq = 0; o.hash = DQMNet::dqmhash(fullpath.c_str(), fullpath.size()); o.flags = me.data_.flags; o.tag = me.data_.tag;