Skip to content

Fix breakdown API pagination when using event metrics - #2562

Merged
vinibrsl merged 3 commits into
masterfrom
breakdown-api-pagination
Jan 5, 2023
Merged

Fix breakdown API pagination when using event metrics#2562
vinibrsl merged 3 commits into
masterfrom
breakdown-api-pagination

Conversation

@vinibrsl

@vinibrsl vinibrsl commented Jan 3, 2023

Copy link
Copy Markdown
Contributor

This commit fixes a bug where the subsequent breakdown API pages had the same items as the first page. The fix sorts the underlying ClickHouse query by timestamp, keeping the same order between requests, as we use OFFSET/LIMIT pagination.

Closes #2561

This commit fixes a bug where the subsequent breakdown API pages had
the same items as the first page. The fix sorts the underlying
ClickHouse query by timestamp, keeping the same order between requests,
as we use OFFSET/LIMIT pagination.
@vinibrsl
vinibrsl requested a review from a team January 3, 2023 19:09
@bundlemon

bundlemon Bot commented Jan 3, 2023

Copy link
Copy Markdown

BundleMon

Unchanged files (7)
Status Path Size Limits
static/css/app.css
515.19KB -
static/js/dashboard.js
297.45KB -
static/js/app.js
12.13KB -
static/js/embed.host.js
5.58KB -
static/js/embed.content.js
5.06KB -
tracker/js/plausible.js
748B -
static/js/applyTheme.js
314B -

No change in files bundle size

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Comment thread lib/plausible/stats/breakdown.ex Outdated
@vinibrsl
vinibrsl requested review from aerosol and ukutaht January 4, 2023 13:41
@vinibrsl
vinibrsl force-pushed the breakdown-api-pagination branch 2 times, most recently from c4cb566 to a930bd4 Compare January 5, 2023 01:01
@vinibrsl
vinibrsl force-pushed the breakdown-api-pagination branch from a930bd4 to 1f5e2e2 Compare January 5, 2023 01:08
@vinibrsl
vinibrsl merged commit 4503895 into master Jan 5, 2023
@vinibrsl
vinibrsl deleted the breakdown-api-pagination branch January 5, 2023 01:14
@vinibrsl vinibrsl mentioned this pull request Jan 20, 2023
2 tasks
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.

API pagination's duplicates

3 participants