1
0
Fork 0

Better debugging messages

This commit is contained in:
Simon Grätzer 2017-01-10 16:30:15 +01:00
parent df462412c5
commit d001199450
3 changed files with 9 additions and 4 deletions

View File

@ -43,7 +43,7 @@ using namespace arangodb::pregel::algos;
PageRankAlgorithm::PageRankAlgorithm(arangodb::velocypack::Slice params)
: SimpleAlgorithm("PageRank", params) {
VPackSlice t = params.get("convergenceThreshold");
_threshold = t.isNumber() ? t.getNumber<float>() : 0.0000002f;
_threshold = t.isNumber() ? t.getNumber<float>() : 0.000002f;
}
struct PageRankGraphFormat : public FloatGraphFormat {

View File

@ -180,7 +180,7 @@ bool Conductor::_startGlobalStep() {
} else {
LOG(INFO) << "Conductor started new gss " << _globalSuperstep;
}
return res != TRI_ERROR_NO_ERROR;
return res == TRI_ERROR_NO_ERROR;
}
// ============ Conductor callbacks ===============
@ -334,7 +334,11 @@ void Conductor::startRecovery() {
basics::ThreadPool* pool = PregelFeature::instance()->threadPool();
pool->enqueue([this] {
// let's wait for a final state in the cluster
usleep(15 * 1000000);
for (int i = 0; i < 15; i++) {
// on some systems usleep does not
// like arguments greater than 1000000
usleep(1000000);
}
std::vector<ServerID> goodServers;
int res = PregelFeature::instance()->recoveryManager()->filterGoodServers(
_dbServers, goodServers);
@ -351,7 +355,6 @@ void Conductor::startRecovery() {
b.close();
_dbServers = goodServers;
_sendToAllDBServers(Utils::cancelGSSPath, b.slice());
usleep(5 * 1000000); // workers may need a bit of time (5 secs)
// Let's try recovery
if (_algorithm->supportsCompensation()) {

View File

@ -185,8 +185,10 @@ void* GraphStore<V, E>::mutableVertexData(VertexEntry const* entry) {
template <typename V, typename E>
void GraphStore<V, E>::replaceVertexData(VertexEntry const* entry, void* data,
size_t size) {
//if (size <= entry->_vertexDataOffset)
void* ptr = _vertexData.data() + entry->_vertexDataOffset;
memcpy(ptr, data, size);
LOG(WARN) << "Don't use this function with varying sizes";
}
template <typename V, typename E>