Skip to content
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

count deleted by total_records fixes 1170 #1630

Merged
merged 3 commits into from
May 16, 2018

Conversation

stloma
Copy link
Contributor

@stloma stloma commented May 16, 2018

Fixes #1170

This issue was caused by relying on offset < total_records to include the Next-Page header.

This Boolean check makes sense when we're getting records since total_records does not change and offset is incremented. When deleting, however, offset is incremented and total_records is decremented, so the Next-Page header will stop being included when at roughly half of the beginning count of total_records.

Also, I understand @glasserc is discussing how to handle Total-Records in #1624 and this direct reliance on Total-Records might not make sense in the long-term. It still makes sense to me to push this change so you all can close out the original issue, but just thought I'd mention it in case you all have a different opinion on that.

@stloma stloma changed the title count deleted by total_records count deleted by total_records fixes 1170 May 16, 2018
Copy link
Contributor

@leplatrem leplatrem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍

@leplatrem leplatrem requested a review from glasserc May 16, 2018 07:49
Copy link
Member

@Natim Natim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thanks a lot!

@stloma stloma closed this May 16, 2018
@stloma stloma deleted the pagination-delete-endpoint branch May 16, 2018 13:26
@glasserc
Copy link
Contributor

I agree that this is a good fix and we should merge it -- why did you close it @stloma ?

@stloma
Copy link
Contributor Author

stloma commented May 16, 2018

Darn, sorry, I was trying to clean up some of my older branches and deleted this by mistake :(

@stloma stloma restored the pagination-delete-endpoint branch May 16, 2018 14:23
@stloma stloma reopened this May 16, 2018
@stloma
Copy link
Contributor Author

stloma commented May 16, 2018

Reopened from reflog, so it's the exact same changes that were already reviewed.

@glasserc glasserc merged commit 0996e71 into Kinto:master May 16, 2018
@stloma stloma deleted the pagination-delete-endpoint branch May 16, 2018 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Paginated delete missing last page token
4 participants