[Box Backup-commit] COMMIT r2315 - box/trunk/bin/bbackupd

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Fri Oct 3 23:43:17 BST 2008


Author: chris
Date: 2008-10-03 23:43:17 +0100 (Fri, 03 Oct 2008)
New Revision: 2315

Modified:
   box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp
Log:
Log creation of directory records and warn on conflicting records.


Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp	2008-10-03 22:42:43 UTC (rev 2314)
+++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp	2008-10-03 22:43:17 UTC (rev 2315)
@@ -1078,6 +1078,7 @@
 			if(latestObjectID != 0)
 			{
 				// Use this one
+				BOX_TRACE("Storing uploaded file ID " << inodeNum << " (" << filename << " in ID map as object " << latestObjectID << " with parent " << mObjectID << " (" << rLocalPath << ")");
 				idMap.AddToMap(inodeNum, latestObjectID, mObjectID /* containing directory */);
 			}
 			else
@@ -1089,12 +1090,19 @@
 				if(currentIDMap.Lookup(inodeNum, objid, dirid))
 				{
 					// Found
+					if (dirid != mObjectID)
+					{
+						BOX_WARNING("Found conflicting parent ID for file ID " << inodeNum << " (" << filename << "): expected " << mObjectID << " (" << rLocalPath << ") but found " << dirid << " (same directory used in two different locations?)");
+					}
+
 					ASSERT(dirid == mObjectID);
+
 					// NOTE: If the above assert fails, an inode number has been reused by the OS,
 					// or there is a problem somewhere. If this happened on a short test run, look
 					// into it. However, in a long running process this may happen occasionally and
 					// not indicate anything wrong.
 					// Run the release version for real life use, where this check is not made.
+					BOX_TRACE("Storing found file ID " << inodeNum << " (" << filename << " in ID map as object " << latestObjectID << " with parent " << mObjectID << " (" << rLocalPath << ")");
 					idMap.AddToMap(inodeNum, objid, mObjectID /* containing directory */);				
 				}
 			}




More information about the Boxbackup-commit mailing list