SoftInstigate / restheart

Rapid API Development with MongoDB
https://restheart.org
GNU Affero General Public License v3.0
805 stars 171 forks source link

Weaker concurrency with disabled If-Match check for updates #112

Closed samfromlv closed 8 years ago

samfromlv commented 8 years ago

Restheart enforces strict concurrency protection model. To update a document you have to specify valid If-Match header with your PUT request, otherwise you will get 409 Conflict response. This approach assumes that you have read document before updating it. Its not the case for some systems where you sync data one way and concurrency is not the issue.

I would suggest disabling 409 response it If-Match header was not sent. Another option to add configuration flag to control concurrency check behavior.

Restheart version 1.1.6.

ujibang commented 8 years ago

Hi @samfromlv

happy news, if you try the 2.0.0-beta-1 release it is already like that (docker tag is 2.0.0-beta-1).

basically the behavior is on 2.x as follows:

thanks for confirming this need.