Open smartcitydevops opened 4 years ago
The problems is probably due to Cygnuss trying to create an index which one of the following key patterns:
{
"_id.entityId" : 1,
"_id.entityType" : 1,
"_id.attrName" : 1,
"_id.resolution" : 1,
"_id.origin" : 1
}
or
{
"_id.origin" : 1
}
Cygnus tryes to use the name cyg_agg_opt
for that index, but the problem doesn't seem actually related with index names. I may say that it is related with they key pattern Cygnus tries to use.
The reported log is just a warn....is not a bug. It's an undesirable but expected situation.
Just in case it can be useful, some code hint found by @mrutid yesterday:
It seems that https://github.com/telefonicaid/fiware-cygnus/commit/713913ecc2a4b24489fa86d0c8297c669a46e03a adds the catch that is printing the WARN trace:
} catch (Exception e) {
LOGGER.warn("Error in collection " + collectionName + " creating index ex=" + e.getMessage());
}
That commit belongs to PR https://github.com/telefonicaid/fiware-cygnus/issues/1975 and, according to git, has been around since Cygnus 1.16.0 (september 2019)
We have detected that there are many errors when persisting data in cygnus_sth, according to these repeated logs:
We have detected this iuise when upgading the mongodb version from 3.6 to 4.2. Just this change.
The existing indexes in both collections are:
We think that cyg_agg_opt is an expected index by cygnus_sth . Please update in order to perform any action