[DB2 nosql] Ceilometer sample-list alway return nothing with two timestamp condition queries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
Medium
|
Lan Qi song | ||
Juno |
Fix Released
|
Medium
|
Lan Qi song |
Bug Description
1. I tried the following sample-list command:
[root@Controller ~]# ceilometer sample-list -m cpu_util
+------
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+------
| a5074a11-
+------
Please notice that the timestamp value is "2015-01-
2. Next, I tried the second command :
[root@Controller ~]# ceilometer sample-list -m cpu_util -q 'timestamp>
+------
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+------
+------
It returned nothing, but the timestamp is between two timestamp conditions.
The reason for this problem is that
1. There is a concept named "datatype" of index in DB2 nosql, the default value is "varchar".
2. It will create an index for "timestamp" filed when using 'ceilometer-dbsync' command, but the 'datatype' is set to "varchar".
3. We should create an index for "timestamp" filed with a "datatype" set to "TIMESTAMP"
nosql>db.
[{"v":0,
Also, I noticed that DB2 nosql can automatically create the suitable index type when you create an index on the collection which already has documents. We can make full use of this function to resolve this problem I think.
Changed in ceilometer: | |
assignee: | nobody → Lan Qi song (lqslan) |
Changed in ceilometer: | |
milestone: | none → kilo-2 |
importance: | Undecided → Medium |
no longer affects: | ceilometer/kilo |
Changed in ceilometer: | |
status: | Fix Committed → Fix Released |
Changed in ceilometer: | |
milestone: | kilo-2 → 2015.1.0 |
Fix proposed to branch: master /review. openstack. org/147766
Review: https:/