@@ -1397,6 +1397,8 @@ MMFilesWalLogfile* MMFilesLogfileManager::getCollectableLogfile() {
1397
1397
// iterate over all active readers and find their minimum used logfile id
1398
1398
MMFilesWalLogfile::IdType minId = UINT64_MAX;
1399
1399
1400
+ LOG_TOPIC (DEBUG, Logger::FIXME) << " getCollectableLogfile: called" ;
1401
+
1400
1402
auto cb = [&minId](TRI_voc_tid_t, TransactionData const * data) {
1401
1403
MMFilesWalLogfile::IdType lastWrittenId = static_cast <MMFilesTransactionData const *>(data)->lastSealedId ;
1402
1404
@@ -1422,16 +1424,26 @@ MMFilesWalLogfile* MMFilesLogfileManager::getCollectableLogfile() {
1422
1424
}
1423
1425
1424
1426
if (logfile->id () <= minId && logfile->canBeCollected (released)) {
1427
+ LOG_TOPIC (DEBUG, Logger::FIXME) << " getCollectableLogfile: found logfile id: " << logfile->id ();
1425
1428
return logfile;
1426
1429
}
1427
1430
1428
- if (logfile->id () > minId || !logfile->hasBeenReleased (released)) {
1431
+ if (logfile->id () > minId) {
1432
+ LOG_TOPIC (DEBUG, Logger::FIXME) << " getCollectableLogfile: abort early1 "
1433
+ << logfile->id () << " minId: " << minId;
1434
+ break ;
1435
+ }
1436
+ if (!logfile->hasBeenReleased (released)) {
1429
1437
// abort early
1438
+ LOG_TOPIC (DEBUG, Logger::FIXME) << " getCollectableLogfile: abort early2 released: " << released;
1430
1439
break ;
1431
1440
}
1432
1441
}
1433
1442
}
1434
1443
1444
+ LOG_TOPIC (DEBUG, Logger::FIXME) << " getCollectableLogfile: "
1445
+ << " found no logfile to collect, minId:" << minId;
1446
+
1435
1447
return nullptr ;
1436
1448
}
1437
1449
@@ -1741,8 +1753,7 @@ int MMFilesLogfileManager::waitForCollector(MMFilesWalLogfile::IdType logfileId,
1741
1753
1742
1754
locker.unlock ();
1743
1755
1744
- // LOG_TOPIC(TRACE, arangodb::Logger::FIXME) << "still waiting for collector. logfileId: " << logfileId <<
1745
- // " lastCollected: " << _lastCollectedId << ", result: " << res;
1756
+ LOG_TOPIC (DEBUG, arangodb::Logger::FIXME) << " still waiting for collector. logfileId: " << logfileId << " lastCollected: " << _lastCollectedId << " , result: " << res;
1746
1757
1747
1758
if (res != TRI_ERROR_LOCK_TIMEOUT && res != TRI_ERROR_NO_ERROR) {
1748
1759
// some error occurred
0 commit comments