Two new methods were added to the JIO API: check and repair!

Storage servers are not perfect, so some errors may occur each time we send a request to the distant machine. The check and repair methods are here to save a coherent state.

To check or repair a document, just do: jio.check({"_id": "document"});, jio.repair({"_id": "document"});, or we can check a specific revision by adding "_rev" next to the document id.

To implement check and repair on your storage connector, you must think about what is a coherent state and how you can fix it. For some storages, it is not necessary to develop such method because there is no way to detect if the distant machine is on a non coherent state.

For replicate revision storage, the repair method will synchronize documents in order to have them all on each storages. It may produce some revision conflict but you can easily remove them with the remove method.

For revision storage, check and repair won't detect revision conflicts as a non coherent state, use get method instead.

Bottom Gadget
Right Gadget