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 HealthCheck.Persistence littering journal and snapshot store #206

Merged
merged 4 commits into from
Mar 8, 2023

Conversation

Arkatufus
Copy link
Contributor

No description provided.

}
else
{
Context.System.Scheduler.ScheduleTellOnce(_delay, _probe, "hit" + _probeCounter++, Self);
Copy link
Member

Choose a reason for hiding this comment

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

why don't we version this any longer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see the merit of versioning this, we already have "versioning" via the sequence number

Copy link
Member

Choose a reason for hiding this comment

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

Chesterton's Fence - why remove it if it's not hurting anything? I can't tell you, given how old the code is, why it was there in the first place.

@Aaronontheweb
Copy link
Member

How does this fix the problem? I'm not following

{
_probe = Context.ActorOf(Props.Create(() => new SuicideProbe(Self, firstTime, _id)));
if(firstTime)
var isEven = _probeCounter % 2 == 0;
Copy link
Member

Choose a reason for hiding this comment

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

Need to add comments explaining the process here. Not obvious just from reading the code.

@@ -238,8 +252,8 @@ public SuicideProbe(IActorRef probe, bool firstAttempt, string id)

if (!_firstAttempt)
{
DeleteMessages(save.Metadata.SequenceNr - 1);
DeleteSnapshots(new SnapshotSelectionCriteria(save.Metadata.SequenceNr - 1));
DeleteMessages(long.MaxValue);
Copy link
Member

Choose a reason for hiding this comment

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

Need to detail these changes with comments too

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

Add the hit counter back to all messages - it makes it possible to tell at what generation the probe failed. Better to have that data than not.

{
_probe.Tell("hit" + _probeCounter++);
Copy link
Member

Choose a reason for hiding this comment

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

Put the counter back in

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

LGTM

@Aaronontheweb Aaronontheweb merged commit b02cbbc into petabridge:dev Mar 8, 2023
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.

2 participants