[MongoDB] indexes one field twice
Bug #1533294 reported by
Igor Degtiarov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Won't Fix
|
Medium
|
Igor Degtiarov |
Bug Description
Now in impl_mongodb we could create two indexes timestamp_idx and optional ttl_idx, each of them is created for the same timestamp field.
In MongoDB one field cannot be indexes twice if index is not compound.
In our case it could happen because we use different indexing order ascending for ttl_idx and descending for timestamp_index.
That lead to an unpredictable results of using timestamp field in queries.
For example if in query we have one operator over timestamp field `lte` --- MongoDB will use timestamp_idx, but if we have two operators over timestamp field `lge` and `gte` --- mongo will use ttl_idx.
Changed in ceilometer: | |
assignee: | nobody → Igor Degtiarov (idegtiarov) |
description: | updated |
Changed in ceilometer: | |
importance: | Undecided → Medium |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/290433
Review: https:/