Avoid commit conflicts
See https://github.com/huggingface/datasets-server/issues/1163#issuecomment-1598504866 and following comments

- [x] add tests to check if `parent_commit=parent_commit if not commit_infos else commit_infos[-1].oid` is correct. Yes; see https://github.com/huggingface/datasets-server/pull/1408
- [x] add write/read concern for the lock requests to ensure consistency - the [default](https://www.mongodb.com/docs/manual/reference/write-concern/#implicit-default-write-concern) is already write_concern = "majority", so we shouldn't need to change this.
- [ ] ???
Avoid commit conflicts: See https://github.com/huggingface/datasets-server/issues/1163#issuecomment-1598504866 and following comments

- [x] add tests to check if `parent_commit=parent_commit if not commit_infos else commit_infos[-1].oid` is correct. Yes; see https://github.com/huggingface/datasets-server/pull/1408
- [x] add write/read concern for the lock requests to ensure consistency - the [default](https://www.mongodb.com/docs/manual/reference/write-concern/#implicit-default-write-concern) is already write_concern = "majority", so we shouldn't need to change this.
- [ ] ???