feedhenry / fh-sync

Node.js implementation of the FeedHenry Data Synchronisation Server. To be used in conjunction with the FeedHenry Data Synchronisation Client.
http://feedhenry.org
Apache License 2.0
5 stars 17 forks source link

add support for retrying pending changes #46

Closed wei-lee closed 5 years ago

wei-lee commented 5 years ago

What

This PR introduces a new feature to allow the pending changes to be retried. The number of retries and the retry interval can be configured by developers.

Why

This is related to issue: https://issues.jboss.org/browse/RHMAP-21014.

What happens is that sometimes the custom sync handlers could fail occasionally. At the moment, when an error occurred, there is no retry mechanism and the pending change is simply treated as processed and later on the client data will be reverted. This will cause some confusion to both users and developers and the sync server itself should allow occasional failures from the sync handlers.

To test

ping @wtrocki @camilamacedo86 @shannon

wtrocki commented 5 years ago

@wei-lee World class work. I have tested that with integration tests (with modified parameters as well) and also in standalone server.

wtrocki commented 5 years ago

Good to go! Going to include this changes in the batch of sync changes that were done recently and retest that again.