designate/designate/storage
James Li 5879c90098 Fix data filtering with pagination
When listing recordsets with filtering on record data,
designate makes a first filtering against recordsets table
to retrieve a list of recordsets belonging to the specified
zone, followed by the second filtering against records table
on record data (e.g. IPs), then intersects the two.
Check https://github.com/openstack/designate/blob/master/designate/api/v2/controllers/recordsets.py

This approach does not work properly when pagination happens.
Imagine a zone has 21 A records with 10.* like IPs,
and 9 A records with 192.* like IPs. When requesting
"/v2/zone/{zone_id}/recordsets?data=10.*", designate makes
the first filtering and get the first page (i.e. 20 recordsets) which may
have both 192.* and 10.* records mixed together,
the second filtering actually excludes all 192.* records from the first page.
But that ends up with a page less than 20 records, so designate won't
include a 'next' link in the response.

This patch fixes the problem.

Closes-bug: #1561746
Change-Id: Ib06dd288d129ff4b39c388d80f24d179c6af28d8
2016-04-20 15:01:35 +00:00
..
impl_sqlalchemy Fix data filtering with pagination 2016-04-20 15:01:35 +00:00
__init__.py Refactor central/service and others 2016-04-08 18:23:56 +01:00
base.py Add support for getting Service Status 2016-04-12 16:32:17 +02:00