-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
src/test/java/com/spotify/confidence/ConfidenceEventSenderIntegrationTest.java
Outdated
Show resolved
Hide resolved
src/main/java/com/spotify/confidence/EventSenderEngineImpl.java
Outdated
Show resolved
Hide resolved
03658e7
to
2f568c7
Compare
src/main/java/com/spotify/confidence/EventSenderEngineImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/spotify/confidence/EventSenderEngineImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/spotify/confidence/EventSenderEngineImpl.java
Outdated
Show resolved
Hide resolved
final boolean passedMaxFlushInterval = | ||
!maxFlushInterval.isZero() | ||
&& Duration.between(latestFlushTime, Instant.now()).compareTo(maxFlushInterval) > 0; | ||
if (events.size() == maxBatchSize || passedMaxFlushInterval) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
No description provided.