Deleting Orphan BLOBs from the External Data Store
Last modified: October 01, 2009
Applies to: SharePoint Foundation 2010
Because using the EBS Provider causes the accumulation of orphaned BLOB files over time, you must delete orphaned BLOBs on a schedule that is appropriate for your site.
SharePoint Foundation does not provide synchronous deletion of externally stored BLOB files. When a file is deleted (purged from the Recycle Bin), the file reference and metadata that is stored in the Microsoft SQL Server content database is deleted, but SharePoint Foundation provides no callback to the EBS Provider to delete the associated BLOB from the external BLOB store. For this and other reasons (for example, when a front-end Web application failure occurs while in the process of storing a BLOB file), the external BLOB store can accumulate orphaned BLOB files.
The ISPExternalBinaryProvider interface provides no delete method. Because these BLOB files are stored outside the SQL Server transactional boundary, the provider interface supports a "lazy" (or passive) garbage collection scheme for disposing of orphaned files.
The topic Implementing Lazy Garbage Collection describes how to manage garbage collection for orphaned BLOB files in the external BLOB store. You should follow these steps in the sequence presented; not doing so can cause problematic race conditions.
Because SharePoint Foundation does not participate in this garbage collection scheme, the EBS Provider is responsible for managing garbage collection in a manner appropriate for the site.