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

getHealth: add retention window to status #146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

2opremio
Copy link
Contributor

I am open to design modifications

What

Status will be "healthy" when the retention window isn't full and "healthy, retention window full", when the window is full.

Why

Make it simpler to write health probes

Known limitations

N/A

Status will be `"healthy"` when the retention window isn't full and
"healthy, retention window full", when the window is full.

I am open to design modifications
oldestLedger := ledgerRange.FirstLedger.Sequence
rententionWindowFull := (latestLedger - oldestLedger) >= retentionWindow
if rententionWindowFull {
status += ", retention window full"
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there a lot of places that do an == "healthy" check? This would break that. Maybe it'd be better to have a separate RetentionWindowStatus: "full" | "incomplete" kinda thing, instead?

@psheth9 psheth9 added the api-change Any changes to existing API or addition of new API label May 15, 2024
@Shaptic Shaptic added the breaking-change Breaking change tag label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-change Any changes to existing API or addition of new API breaking-change Breaking change tag
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants