syn.store always updates annotations

Description

Even when there is nothing to update. It should at least be able to detect that there no change in the annotations and save 1 round trip to the backend. The call to update annotation also change the modifiedOn field on the entity unnecessary.

Environment

None

Activity

Show:
Jordan Kiang
April 9, 2021, 10:08 PM

Closing per validation steps.

Jordan Kiang
March 8, 2021, 6:21 PM

We'll now check the that the annotations have changed from those of the retrieved entity bundle and skip invoking a PUT to /entity/{id}/annotations2 if they have not.

Note that this bug also mentions that the modified on date does not change, that is not completely resolved by this issue. While this issue resolves unnecessary annotation updates the client can still invoke a PUT of an entity itself even if other fields have not changed, as currently it does not do a complete comparison of all fields.

Initial validation done e.g.

Ken is no longer here so will find another interested party to do a separate validation once the RC for 2.4 is available.

Bruce Hoff
August 23, 2019, 11:00 PM

Per , this affects the Gates Foundation's work. A possible solution is to provide a new function that does upload without trying to manage annotations at the same time. Part of the reason that annotations are currently always 'touched' is that the client uses the EntityBundle. A counter argument to having a separate, simpler function is that it might be a best practice always to annotate when uploading new content.

Fixed

Assignee

Chia-Hui Lin

Reporter

Kimyen Truong

Labels

Validator

Kenneth Daily

Development Area

None

Release Version History

None

Slack Channel

None

Fix versions

Affects versions

Priority

Major