Support Document Versioning
The ability to generate links to a previous version of a document would be a powerful addition DocumentDB that has many use cases.
In my case I need a self managed profile document that needs to be referenced at point in time to be tied to an event.
Azure Cosmos DB now provides the ability to access the change feed (https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed). A common pattern to implement eventing patterns is
1. Store every version/change as a separate item
2. Read the change feed to merge/consolidate changes and trigger appropriate actions downstream.
You can also expire old versions using TTL: https://docs.microsoft.com/en-us/azure/cosmos-db/time-to-live
How do I even distinguish between an insert or update? I only need documents that were updated.
Stan Spotts commented
"Only the most recent change for a given item is included in the change log. Intermediate changes may not be available."
Doesn't this make change feed useless for true versioning? One or more changes may not appear in the change log as distinct versions, no?
Support to get the previous version of the document in change feed.
This would be handy if the business logic requires comparison with the previous values and execute a specific logic.
This would also allow documentDb to be used as an event store. If we could get a feed per document in combination it would be ideal.
e.g. I subscribe to document JoeSmith. I get notified when the document has changed with it's version number. I can easily call the previous version to see what has changed
Jerome Meinke commented
CouchDB has this too, please add this feature to DocumentDB!
Jerome Meinke commented
Looks like a duplicate of https://feedback.azure.com/forums/263030-documentdb/suggestions/6532266-support-document-versioning
Michael Belton commented
It would be nice if we can keep track of changed key values linked to original active document rather than storing entire changed document.
Also publish some feeds for each action with minimum document details.
Anand Chalatt commented
We would like to see the out of the box document versioning support with DocumentDB. This will enable to keep multiple versions of the same document within Azure Document DB.
Cloudy Media commented
There can a mode DB mode where Update is append only and deletes are indicated by a tombstone. All versions of the document will naturally be available in this mode.