-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MongoDB indexes cyg_raw_opt could have worsened in newers versions #2291
Comments
Answer to that question at SOF should be edited when this issue gets addressed (maybe saying the new version in which the fix would be included). |
Relevant cygnus configuration, from SOF question:
|
Hi @fgalan , I have tried to reproduce the issue. Index creation is reproduced successfully. Prepared the mongo query as per the code https://github.com/telefonicaid/fiware-sth-comet/blob/2.10.0/lib/database/sthDatabase.js#L503 and then get the executionStats of the query. winningPlan of above query is using index cyg_raw_opt index. So, it seems that index is correctly used by STH-Comet.
As per my understanding, index is correctly used. Please confirm my understanding. |
@ctc-watanabe as you were the one that raised this issue, could you have a look to @MadhuNEC comment and provide feedback, please? Thanks in advance! |
Note PR #2314 has been recently merged. Not sure if this PR could be related with this issue... please take it into account. |
@fgalan I have investigated on the master branch, but it seems that the problem has not been resolved.
Probably, it is the process of the following code in STH-Comet. I checked the COUNT process with the following command, and it is still COUNT_SCAN in Cygnus 2.20.0.
However, in Cygnus 3.2.0 and master branch, it is COLLSCAN as follows.
|
After this PR #2205 indexed are created having into account DataModel (DM) type. Which DM is involve in this case ? |
In my test environment, I set "dm-by-service-path" for DM. |
Then index for sth collection involves the following keys:
Moreover, after PR #2314 indexes when expirates are recreated even when conflict due to datamodel has changed. |
Based on the discussion on https://stackoverflow.com/questions/76570277/differences-in-query-logs-when-read-by-sth-comet-caused-by-cygnus-version-upgrad (I'd suggest to read it carefully) the indexes created by Cygnus at MongoDB could have worsened from 2.20.0 to 3.2.0
In 2.20.0:
In 3.2.0:
The entityId_1_entityType_1_attrName_1_recvTime_1 was added manually (the same as old cyg_raw_opt).
The text was updated successfully, but these errors were encountered: