1
0
Fork 0

Merge branch 'devel' of ssh://github.com/ArangoDB/ArangoDB into devel

This commit is contained in:
Max Neunhoeffer 2017-06-07 16:23:28 +02:00
commit 7a37700b5f
6 changed files with 10 additions and 8 deletions

View File

@ -144,7 +144,7 @@ void Constituent::termNoLock(term_t t) {
result = trx.insert("election", body.slice(), options);
} catch (std::exception const& e) {
LOG_TOPIC(FATAL, Logger::AGENCY)
<< "Failed to persist RAFT election ballot. Bailing out."
<< "Failed to persist RAFT election ballot: " << e.what() << ". Bailing out."
<< __FILE__ << ":" << __LINE__;
FATAL_ERROR_EXIT();
}

View File

@ -204,7 +204,7 @@ index_t State::logNonBlocking(
try {
_log.push_back(log_t(idx, term, buf, clientId)); // log to RAM or die
} catch (std::bad_alloc const& e) {
} catch (std::bad_alloc const&) {
if (leading) {
LOG_TOPIC(FATAL, Logger::AGENCY)
<< "RAFT leader fails to allocate volatile log entries!"

View File

@ -255,10 +255,11 @@ bool RocksDBEdgeIndexIterator::nextExtra(ExtraCallback const& cb,
TRI_ASSERT(_builderIterator.value().isNumber());
RocksDBToken tkn{
_builderIterator.value().getNumericValue<uint64_t>()};
_builderIterator.next();
TRI_ASSERT(_builderIterator.valid());
TRI_ASSERT(_builderIterator.value().isString());
cb(tkn, _builderIterator.value());
_builderIterator.next();
@ -676,9 +677,11 @@ void RocksDBEdgeIndex::warmup(arangodb::transaction::Methods* trx) {
RocksDBToken token(revisionId);
if (rocksColl->readDocument(trx, token, mmdr)) {
builder.add(VPackValue(token.revisionId()));
VPackSlice doc(mmdr.vpack());
TRI_ASSERT(doc.isObject());
builder.add(doc);
VPackSlice toFrom = _isFromIndex ? transaction::helpers::extractToFromDocument(doc) : transaction::helpers::extractFromFromDocument(doc);
TRI_ASSERT(toFrom.isString());
builder.add(toFrom);
#ifdef USE_MAINTAINER_MODE
} else {
// Data Inconsistency.

View File

@ -399,9 +399,6 @@ void SlotWrite(GeoIx * gix,int slot, GeoCoordinate * gc)
char data[sizeof (GeoCoordinate)];
toPersistent(*gc, &data[0]);
RocksWrite(gix, key, rocksdb::Slice(&data[0], sizeof(GeoCoordinate)));
GeoCoordinate test;
fromPersistent(&data[0],test);
}
void PotRead(GeoIx * gix, int pot, GeoPot * gp)

View File

@ -387,6 +387,7 @@ int TRI_Adler32(char const* filename, uint32_t& checksum) {
struct TRI_STAT statbuf;
int res = TRI_FSTAT(fd, &statbuf);
if (res < 0) {
TRI_ERRORBUF;
TRI_SYSTEM_ERROR();
return TRI_set_errno(TRI_ERROR_SYS_ERROR);
}

View File

@ -175,6 +175,7 @@ Ticket Communicator::addRequest(Destination destination,
NewRequest{destination, std::move(request), callbacks, options, id});
}
LOG_TOPIC(TRACE, Logger::COMMUNICATION) << "request to " << destination.url() << " has been put onto queue";
// mop: just send \0 terminated empty string to wake up worker thread
#ifdef _WIN32
ssize_t numBytes = send(_socks[1], "", 1, 0);