summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/bbstored/HousekeepStoreAccount.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/bbstored/HousekeepStoreAccount.cpp b/bin/bbstored/HousekeepStoreAccount.cpp
index a7a3bc22..9ed821a7 100644
--- a/bin/bbstored/HousekeepStoreAccount.cpp
+++ b/bin/bbstored/HousekeepStoreAccount.cpp
@@ -889,15 +889,23 @@ void HousekeepStoreAccount::DeleteFile(int64_t InDirectory, int64_t ObjectID, Ba
}
// Drop reference count by one. If it reaches zero, delete the file.
- if (--mNewRefCounts[ObjectID] == 0)
+ if(--mNewRefCounts[ObjectID] == 0)
{
// Delete from disc
+ BOX_TRACE("Removing unreferenced object " <<
+ BOX_FORMAT_OBJECTID(ObjectID));
std::string objFilename;
MakeObjectFilename(ObjectID, objFilename);
RaidFileWrite del(mStoreDiscSet, objFilename,
mNewRefCounts[ObjectID]);
del.Delete();
}
+ else
+ {
+ BOX_TRACE("Preserving object " <<
+ BOX_FORMAT_OBJECTID(ObjectID) << " with " <<
+ mNewRefCounts[ObjectID] << " references");
+ }
// Adjust counts for the file
++mFilesDeleted;