huridocs / uwazi

Uwazi is a web-based, open-source solution for building and sharing document collections
http://www.uwazi.io
MIT License
237 stars 79 forks source link

Sync errors with thesauri keys #6865

Open txau opened 3 months ago

txau commented 3 months ago

We are experience a bunch of duplicate thesauri key creation errors during sync:

"json": {
  "error": "E11000 duplicate key error collection: memorialisation.translationsV2 index: language_1_key_1_context.id_1 dup key: { language: \"ps\", key: \"Stats & Filters\", context.id: \"System\" }",
  "prettyMessage": "E11000 duplicate key error collection: memorialisation.translationsV2 index: language_1_key_1_context.id_1 dup key: { language: \"ps\", key: \"Stats & Filters\", context.id: \"System\" }",
  "requestId": 4524
 },

Apparently sync tries to create translations keys that already exist. These errors appeared along with a bunch of other errors about sync not being able to reach the target host, so it may well be that network timeouts created a situation in which key creation is attempted more than once.

Whatever the case is, if we want to ignore these creations attempts, we should properly manage the errors as this is tossing a 500 in our servers.