摘要 |
A data storage system stores data with a corresponding encapsulated metadata token in cache and/or base storage to protect against recalling stale data from base storage in the event of a cache failure and subsequent cache miss. A controller is coupled to a cache, base storage, and token database. After receiving a data object and associated write request, the controller assigns a version code to the data object. If the data object already exists, the controller advances the data object's version code. A token, including the version code along with other items of metadata, is encapsulated for storage. Then, the controller stores the data object and encapsulated token in cache and/or base storage and updates the token database to cross-reference the data object with its version code. When the controller experiences a cache miss, there is danger in blindly retrieving the data object from base storage since the cache miss may have occurred due to cache failure before the data was de-staged, leaving a down-level version of the data object on base storage. This problem is avoided by comparing the data object's version code contained in base storage to the version code listed for the data object in the token database. Only if the compared version codes match, the data object is read from base storage and provided as output.
|