Commit 18c05d87 authored by Eric Cano's avatar Eric Cano
Browse files

Fixed wrong creation of recall job and added missing printout of exception.

parent 54175510
......@@ -95,8 +95,9 @@ public:
std::cout << "The recall FIFO was empty for more than a second. Exiting." << std::endl;
break;
}
usleep(100 * 1000);
} catch (std::exception&) {
usleep(10 * 1000);
} catch (std::exception& e) {
std::cout << "Got exception while getting a recall job:" << e.what() << std::endl;
} catch (...) {
throw;
}
......@@ -215,8 +216,6 @@ private:
for (std::list<AgentVisitor::ownershipEntry>::iterator i=ownedObjects.begin();
i != ownedObjects.end(); i++) {
collectOwnedObject(*i);
std::cout << "Considering owned object " << i->name
<< " (type:" << i->objectType << ")" << std::endl;
}
// print the recall FIFO
std::cout << "Recall FIFO after garbage collection:" << std::endl;
......
......@@ -91,10 +91,10 @@ public:
ret<< "<<<< FIFO dump start" << std::endl
<< "Read pointer=" << fs.readpointer() << std::endl
<< "Array size=" << fs.name_size() << std::endl;
for (int i=fs.readpointer(); i<fs.name_size(); i++) {
ret << "name[phys=" << i << " ,log=" << i-fs.readpointer()
<< "]=" << fs.name(i) << std::endl;
}
// for (int i=fs.readpointer(); i<fs.name_size(); i++) {
// ret << "name[phys=" << i << " ,log=" << i-fs.readpointer()
// << "]=" << fs.name(i) << std::endl;
// }
ret<< ">>>> FIFO dump end." << std::endl;
return ret.str();
}
......
#pragma once
#include "ObjectOps.hpp"
#define USE_RADOS 0
#define USE_RADOS 1
#if USE_RADOS
typedef cta::objectstore::ObjectStoreRados myOS;
#else
......
......@@ -16,7 +16,7 @@ public:
rjs.set_status("OK");
std::string ret = agent.nextId("RecallJob");
agent.addToIntend(container, ret, serializers::RecallJob_t);
agent.objectStore().atomicOverwrite(ret, rjs.SerializeAsString());
agent.objectStore().create(ret, rjs.SerializeAsString());
return ret;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment