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

Fixed erroneous handling of "paginated" items in the dashboard's timeline #58

Merged
merged 2 commits into from
May 2, 2024

Conversation

JBBianchi
Copy link
Member

@JBBianchi JBBianchi commented May 2, 2024

In the Dashboard timeline, the streams are read per chucks of 100 items. When the length to be read was set over 100, there were two "paging" issues:

  • gathering of duplicate events for each new chunk (off-by-one error: the last item of the previous chunk was gathered again as the first item of the next chunk due to a bad computation of the offset)
  • length overflow (when requesting 101 items, 200 items were gathered instead because of a lack of proper computing for the length of the last chunk)

This PR then provides two fixes:

  • Proper computing of the start offset of the extra chunks
  • Proper computing of the length of the last chunk

Note:
In addition, due to (I guess) a change in the deserialisation of CloudEvents, when trying to read the sequence attribute, a Decimal is returned instead of a ulong before. This case has been added to CloudEventExtensions

@JBBianchi JBBianchi requested a review from cdavernas May 2, 2024 14:11
@JBBianchi JBBianchi merged commit 80b4024 into main May 2, 2024
2 checks passed
@JBBianchi JBBianchi deleted the fix-dashboard-timeline-length branch May 2, 2024 14:53
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.

1 participant