Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Periodically create partitions for alert executions #398
Periodically create partitions for alert executions #398
Changes from 8 commits
abbbe67
d2ce1d3
e2d8ea5
9275fa9
f118544
b1fc6db
f0ab80a
dd711da
929aa31
2b14dff
2b097fe
f015f2d
6f180c5
fd09528
85ebe05
ac21546
ed68e90
e09c1d5
e398c9e
cd9b68f
5c837de
ed117e2
07e8921
9ab2d01
1919870
7167b29
2cb6e0b
d6a5afb
5ee82ea
395bc09
a7ff3f6
4ca92f2
b18deac
466bc04
aa6d0b4
96be3c9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is this worth the method? Especially, since it actually has no logic specific to this actor. Moreover, you could use
PatternCS
(assuming we're on a new enough version of Akka in MP) which should simplify the call to stop (I believe).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.
I can inline this; I had a method to be consistent with the
start
call but since that was removed there's no need for the consistency.As far as the APIs used, PatternsCS and Patterns were merged in Akka 2.5.19 (we're running 2.5.20).
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.
I just looked and MAD is running Akka 2.5.16 so it makes sense that using Patterns works here but not over there.
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.
Not entirely without merit, and not as concerned, but at least may be simpler with
PatternsCS
. I believe we also doubled up on the timeouts with this pattern in MAD and CAGG; e.g.ArpNetworking/metrics-aggregator-daemon@158884e#diff-fed66f6be12dfd97b6fb62212dd0d6ebR52
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.
As mentioned above PatternsCS and Patterns are essentially the same API for this version of Akka - but I'll add the timeouts. I'm pretty sure I'm the one that asked you to double up on that code to begin with 😄
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.
Hrm. Is this what you were looking for?
https://doc.akka.io/docs/akka/current/typed/interaction-patterns.html
See: "Ignoring replies"
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.
This is exactly what I was looking for, but that's Akka
2.6.XX
using typed actors so it's not available here 😢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.
Do we really need a local timezone here? What happens if two boxes have different timezones? Would this work equally well just fixed to UTC?
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.
This is not a local time zone, it is UTC regardless of host. I initialized the clock to
Clock.systemUTC()
. I can be explicit here and just specify UTC a second time.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.
As these are local dates, I believe they won't be equal if they have different locales (zones) even if adjusted it's the same point in time. Is this what we want for comparison? (related: see comment about zones above)
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 concern, it's not applicable here because LocalDate instances do not have timezone information - it's essentially just day/month/year
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.
(I'm treating all time in here as UTC which is why the zone offset information was dropped)