chetanmeh opened a new pull request #4339: Enable soft delete mode for documents in CosmosDB URL: https://github.com/apache/incubator-openwhisk/pull/4339 This PR enables soft delete of documents in CosmosDB. This is required for #4277 ## Description By default the documents in CosmosDB are deleted directly. This PR exposes a config option `soft-delete-ttl` which once enabled for a collection would enable the soft delete mode. In this mode instead of actually deleting the document `CosmosDBArtifactStore` would 1. Set a `_deleted` property to `true` 2. Configure a TTL with value as specified in `soft-delete-ttl` This ensures that document gets deleted at some later time. This would allow a service like cache invalidator to pickup up deleted document in change feed. The implementation of this feature needs to ensure following invariants 1. A soft deleted document cannot be read again using `get` call 2. A `put` for soft deleted document should work without conflict 3. Query results should ignore such soft deleted documents ## Usage Configure `soft-delete-ttl` ``` whisk { cosmosdb { WhiskEntity { soft-delete-ttl = 10 h } } } ``` ## Related issue and scope <!--- Please include a link to a related issue if there is one. --> - [ ] I opened an issue to propose and discuss this change (#4277) ## My changes affect the following components <!--- Select below all system components are affected by your change. --> <!--- Enter an `x` in all applicable boxes. --> - [ ] API - [ ] Controller - [ ] Message Bus (e.g., Kafka) - [ ] Loadbalancer - [ ] Invoker - [ ] Intrinsic actions (e.g., sequences, conductors) - [ ] Data stores (e.g., CouchDB) - [ ] Tests - [ ] Deployment - [ ] CLI - [ ] General tooling - [ ] Documentation ## Types of changes <!--- What types of changes does your code introduce? Use `x` in all the boxes that apply: --> - [ ] Bug fix (generally a non-breaking change which closes an issue). - [ ] Enhancement or new feature (adds new functionality). - [ ] Breaking change (a bug fix or enhancement which changes existing behavior). ## Checklist: <!--- Please review the points below which help you make sure you've covered all aspects of the change you're making. --> - [ ] I signed an [Apache CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md). - [ ] I reviewed the [style guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness) and followed the recommendations (Travis CI will check :). - [ ] I added tests to cover my changes. - [ ] My changes require further changes to the documentation. - [ ] I updated the documentation where necessary.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
