[R4.1 mitaka ub14]SessionRecordTable query with 'limit' parameter not working

Bug #1724180 reported by aswani kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.1
Fix Committed
High
mkheni
Trunk
Fix Committed
High
mkheni

Bug Description

R4.1 mitaka build 13 ubuntu14-04

limit was set to 1 but still seeing two records
following is the query in json format

{
   "table":"SessionRecordTable",
   "where":[
      [
         {
            "value2":null,
            "name":"vn",
            "value":"default-domain:admin:vn2",
            "op":1
         },
         {
            "value2":null,
            "name":"remote_vn",
            "value":"default-domain:admin:vn1",
            "op":1
         }
   ]
   ],
    "start_time":1508219489000000,
   "end_time":1508219989000000,
   "select_fields":[
      "vn",
      "remote_vn"
   ],
   "limit": 1,
   "session_type":"client"
}

root@nodec64:~# curl -H "X-Auth-Token:e92ebb792d6440578ad7e98bbb430932" -X POST --data @query_ip 10.204.217.58:8081/analytics/query --header "Content-Type:application/json" | python -mjson.tool
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 895 0 397 100 498 380 477 0:00:01 0:00:01 --:--:-- 477
{
    "value": [
        {
            "forward_flow_uuid": "8eadcc2f-3019-4bf4-a7c0-fe008ae74a64",
            "remote_vn": "default-domain:admin:vn1",
            "reverse_flow_uuid": "539b545b-b0bb-4485-9714-9b6d783e8ba7",
            "vn": "default-domain:admin:vn2"
        },
        {
            "forward_flow_uuid": "d1070cfd-f22e-4049-8930-738fe544a404",
            "remote_vn": "default-domain:admin:vn1",
            "reverse_flow_uuid": "6b07d25d-2973-4254-8651-b7233d70b72b",
            "vn": "default-domain:admin:vn2"
        }
    ]
}

Tags: analytics
Changed in juniperopenstack:
assignee: Arvind (arvindv) → nobody
importance: High → Undecided
tags: added: analytics
Sachin Bansal (sbansal)
Changed in juniperopenstack:
assignee: nobody → mkheni (mkheni)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/36609
Submitter: mkheni (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/36610
Submitter: mkheni (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/36609
Committed: http://github.com/Juniper/contrail-controller/commit/efbdd2da091a6ff6b76b6338277d93d40b1eab11
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit efbdd2da091a6ff6b76b6338277d93d40b1eab11
Author: mkheni <email address hidden>
Date: Tue Oct 17 20:17:33 2017 -0700

Apply limit for Stats/Session queries after final merge.

For Stats/Session queries, limit was applied at each chunk
but wasn't applied after the final merge, hence final results
may contain more results than the limit specified.

Change-Id: Ie6e2f0d7d3b7f0000a4e68d454d00cbc599fb7f1
Closes-bug: #1724180

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/36610
Committed: http://github.com/Juniper/contrail-controller/commit/ec88b8dccb0d1f7be61be39f50e1321f2947d981
Submitter: Zuul (<email address hidden>)
Branch: master

commit ec88b8dccb0d1f7be61be39f50e1321f2947d981
Author: mkheni <email address hidden>
Date: Tue Oct 17 20:17:33 2017 -0700

Apply limit for Stats/Session queries after final merge.

For Stats/Session queries, limit was applied at each chunk
but wasn't applied after the final merge, hence final results
may contain more results than the limit specified.

Change-Id: Ie6e2f0d7d3b7f0000a4e68d454d00cbc599fb7f1
Closes-bug: #1724180

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.