This commit adds support for Object versioning feature in DBStore
In DBStore, each object is uniquely identified by <objectName, objectNS, instance-id>
In addition, for each object upload, a unique objectID is created to handle racing writes.
Note: For non-versioned objects, both head and tail entries have instance-id empty ""
Versioned objects:
- same as non-versioned objects but with instance-id & objectID set to version-id i.e,
each version upload will have a unique versionID created which will act as that object's intanceID and objectID as well.
- In addition a version-number is stored (starting with '1' & incremented sequentially) for each version/delete-marker being created for that object.
This version-number is used to identify and promote/demote next object version as CURRENT.
Current status:
- Basic functionality seem to be working when the bucket is versioned.
- If an object is removed, only one delete-marker is created for now. Subsequent deletes will be no-op (unless the object is re-created & deleted with the same name)
- Added test cases to test put/get/delete/list of versioned objects
TODO (not addressed as part of this PR):
- Test various cases with versioning suspended & enabled.