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

fix: event engine rewrite #117

Merged
merged 21 commits into from
Apr 15, 2024
Merged

fix: event engine rewrite #117

merged 21 commits into from
Apr 15, 2024

Conversation

andreas-karlsson
Copy link
Contributor

No description provided.

@nicklasl nicklasl marked this pull request as ready for review April 11, 2024 14:45
final boolean passedMaxFlushInterval =
!maxFlushInterval.isZero()
&& Duration.between(latestFlushTime, Instant.now()).compareTo(maxFlushInterval) > 0;
if (events.size() == maxBatchSize || passedMaxFlushInterval) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if I understand the park correctly, if the current event is null, we wait until the maxFlushInterval and then here we check if we are passed that time (which in this case will be true) and then we upload events. should we check here as well if events are not empty?

Copy link
Contributor

Choose a reason for hiding this comment

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

ah never mind, i checked further and realised this check exists in the upload. however i like to be more explicit and have the check here. I prefer the check to be here since calling the function upload and then the upload decides it doesn't want to handle the empty events wouldn't be clear. but absolutely not blocking.

@nicklasl nicklasl merged commit b14e7d3 into main Apr 15, 2024
3 checks passed
@nicklasl nicklasl deleted the simpler-event-sender branch April 15, 2024 08:09
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.

4 participants