Skip to content
Snippets Groups Projects
Commit a185a94a authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Dropped sending of UDP packets between RH and stager as they are obsoleted by...

Dropped sending of UDP packets between RH and stager as they are obsoleted by the use of alerting inside the DB
parent dc3a0303
No related branches found
No related tags found
No related merge requests found
......@@ -65,29 +65,6 @@ castor::rh::RHThread::RHThread()
throw (castor::exception::Exception) :
BaseObject() {
// Determine the stager host and notification port on which to send UDP
// messages too wake up stager services to reduce processing latencies.
const char *value = NULL;
// First the host
m_stagerHost = "";
if ((value = getconfent("STAGER", "NOTIFYHOST", 0))) {
m_stagerHost = value;
}
// Second the port
m_stagerPort = castor::STAGER_DEFAULT_NOTIFYPORT;
if ((value = getconfent("STAGER", "NOTIFYPORT", 0))) {
try {
m_stagerPort = castor::System::porttoi((char *)value);
} catch (castor::exception::Exception& ex) {
castor::exception::InvalidArgument e;
e.getMessage() << "Invalid STAGER/NOTIFYPORT value: "
<< ex.getMessage().str() << std::endl;
throw e;
}
}
// Statically initialize the list of stager service handlers for each
// request type.
// XXX This knowledge is already in the db, cf. the Type2Obj table,
......@@ -477,16 +454,6 @@ void castor::rh::RHThread::run(void* param) {
sock->sendObject(ack);
svcs()->commit(&ad);
if (ack.status()) {
// Notify the appropriate stager service
std::map<int, std::string>::const_iterator it =
m_svcHandler.find(fr->type());
if (it != m_svcHandler.end()) {
castor::server::BaseServer::sendNotification
(m_stagerHost, m_stagerPort, it->second[0], nbThreads);
}
}
// Calculate elapsed time
timeval tv;
gettimeofday(&tv, NULL);
......
......@@ -98,12 +98,6 @@ namespace castor {
unsigned int handleRequest(castor::stager::Request* fr)
throw (castor::exception::Exception);
/// Stager host
std::string m_stagerHost;
/// Stager notify port
unsigned m_stagerPort;
/// Hash table for mapping requests to svc handlers
std::map<int, std::string> m_svcHandler;
......
......@@ -130,23 +130,6 @@ int main(int argc, char* argv[]){
stagerDaemon.getThreadPool('G')->setNbThreads(4);
stagerDaemon.getThreadPool('L')->setNbThreads(1);
// Determine the notification port for the notifier thread pool. The port
// will be used to recieve UDP notifications from the request handler to
// wake up the various stager services.
int notifyPort = castor::STAGER_DEFAULT_NOTIFYPORT;
const char *value = getconfent("STAGER", "NOTIFYPORT", 0);
if (value) {
try {
notifyPort = castor::System::porttoi((char *)value);
} catch (castor::exception::Exception& ex) {
castor::exception::InvalidArgument e;
e.getMessage() << "Invalid STAGER/NOTIFYPORT value: "
<< ex.getMessage().str() << std::endl;
throw e;
}
}
stagerDaemon.addNotifierThreadPool(notifyPort);
stagerDaemon.parseCommandLine(argc, argv);
stagerDaemon.start();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment