1
0
Fork 0

Debug log if an msync takes too long.

This commit is contained in:
Max Neunhoeffer 2017-01-27 16:30:44 +01:00
parent 9a5a50e2d5
commit 18f91ef09e
1 changed files with 5 additions and 0 deletions

View File

@ -161,7 +161,12 @@ int MMFilesSynchronizerThread::doSync(bool& checkMore) {
int fd = getLogfileDescriptor(region.logfileId);
TRI_ASSERT(fd >= 0);
double startTime = TRI_microtime();
bool result = TRI_MSync(fd, region.mem, region.mem + region.size);
if (TRI_microtime() - startTime > 1.0) {
LOG(DEBUG) << "Long sync logfile " << id << ", region "
<< (void*) region.mem << ", size " << region.size;
}
LOG(TRACE) << "syncing logfile " << id << ", region " << (void*) region.mem << " - "
<< (void*)(region.mem + region.size) << ", length: " << region.size