1
0
Fork 0

Various debugging changes

This commit is contained in:
Simon Grätzer 2017-05-20 17:44:28 +02:00
parent 33b33a47b0
commit 45d7c5c715
5 changed files with 10 additions and 15 deletions

View File

@ -518,7 +518,7 @@ struct DMIDComputation
// FIXME
//float const ttt = pair.second / getEdges().size();
float const ttt = pair.second / messages.size();
if (ttt >= *threshold) {
if (ttt > *threshold) {
/** its profitable to become a member, set value */
float deg = 1.0f / std::pow(*iterationCounter / 3.0f, 2.0f);
vertexState->membershipDegree[pair.first] = deg;
@ -628,6 +628,7 @@ struct DMIDGraphFormat : public GraphFormat<DMIDValue, float> {
b.add(_resultField, VPackSlice::nullSlice());
} else if (_maxCommunities == 1) {
b.add(_resultField, VPackValue(communities[0].first.key));
b.add("confidence", VPackValue(communities[0].second));
} else {
unsigned i = _maxCommunities;
b.add(_resultField, VPackValue(VPackValueType::Object));
@ -755,13 +756,10 @@ struct DMIDMasterContext : public MasterContext {
averageFD = (double)averageFD / numLocalLeader;
}
/** set flag for globalLeader */
// if (LOG_AGGS) {
// System.out.print("Global Leader:");
//}
vecFD->forEach([&](PregelID const& _id, double entry) {
if (entry > averageFD) {
initGL->aggregate(_id.shard, _id.key, 1.0);
LOG_TOPIC(INFO, Logger::PREGEL) << "Leader " << _id.key;
LOG_TOPIC(INFO, Logger::PREGEL) << "Global Leader " << _id.key;
}
});
// setAggregatedValue(DMIDComputation.GL_AGG, initGL);

View File

@ -86,7 +86,7 @@ struct SLPAComputation : public VertexComputation<SLPAValue, int8_t, uint64_t> {
// which is not really well parallizable. Additionally I figure
// since a speaker only speaks to neighbours and the speaker order is random
// we can get away with letting nodes listen in turn
bool listen = val->nodeId % 2 == globalSuperstep() % 2;
bool listen = val->nodeId % 4 == globalSuperstep() % 4;
if (messages.size() > 0 && listen) {
// listen to our neighbours
uint64_t newCommunity = mostFrequent(messages);

View File

@ -1415,6 +1415,7 @@ RocksDBOperationResult RocksDBCollection::insertDocument(
res.keySize(key.string().size());
return res;
}
LOG_TOPIC(ERR, Logger::FIXME) << "PUT " << revisionId << " " << mthd->readOptions().snapshot->GetSequenceNumber();
RocksDBOperationResult innerRes;
READ_LOCKER(guard, _indexesLock);
@ -1466,6 +1467,7 @@ RocksDBOperationResult RocksDBCollection::removeDocument(
// document store, if the doc is overwritten with PUT
// Simon: actually we do, because otherwise the counter recovery is broken
// if (!isUpdate) {
LOG_TOPIC(ERR, Logger::FIXME) << "DELETE " << revisionId;
RocksDBMethods* mthd = rocksutils::toRocksMethods(trx);
RocksDBOperationResult res = mthd->Delete(RocksDBColumnFamily::none(), key);
if (!res.ok()) {
@ -1599,6 +1601,7 @@ arangodb::Result RocksDBCollection::lookupRevisionVPack(
mdr.setManaged(std::move(value), revisionId);
} else {
LOG_TOPIC(ERR, Logger::FIXME) << "NOT FOUND " << revisionId << " " << mthd->readOptions().snapshot->GetSequenceNumber();
mdr.reset();
}
return res;

View File

@ -265,8 +265,8 @@ void RocksDBEngine::start() {
// create column families
std::vector<rocksdb::ColumnFamilyDescriptor> columFamilies;
columFamilies.emplace_back(rocksdb::kDefaultColumnFamilyName,
rocksdb::ColumnFamilyOptions());
rocksdb::ColumnFamilyOptions cfOptions2;
rocksdb::ColumnFamilyOptions(_options));
rocksdb::ColumnFamilyOptions cfOptions2(_options);
cfOptions2.comparator = _cmp.get(); // only
columFamilies.emplace_back("IndexValue", cfOptions2);
columFamilies.emplace_back("UniqueIndexValue", cfOptions2);

View File

@ -525,12 +525,6 @@ void ApplicationServer::prepare() {
void ApplicationServer::start() {
LOG_TOPIC(TRACE, Logger::STARTUP) << "ApplicationServer::start";
usleep(1000000);
usleep(1000000);
usleep(1000000);
usleep(1000000);
usleep(1000000);
int res = TRI_ERROR_NO_ERROR;
for (auto feature : _orderedFeatures) {