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

pageserver: remove no-op attempt to report fail/failpoint feature #4879

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

jcsp
Copy link
Collaborator

@jcsp jcsp commented Aug 2, 2023

Problem

The current output from a prod binary at startup is:

git-env:765455bca22700e49c053d47f44f58a6df7c321f failpoints: true, features: [] launch_timestamp: 2023-08-02 10:30:35.545217477 UTC

It's confusing to read that line, then read the code and think "if failpoints is true, but not in the features list, what does that mean?". As far as I can tell, the check of fail/failpoints is just always false because cargo doesn't expose features across crates like this: the fail/failpoints syntax works in the cargo CLI but not from a macro in some crate other than fail.

Summary of changes

Remove the lines that try to check fail/failpoints from the pageserver entrypoint module. This has no functional impact but makes the code slightly easier to understand when trying to make sense of the line printed on startup.

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

The current output from a prod binary at startup is:
```
git-env:765455bca22700e49c053d47f44f58a6df7c321f failpoints: true, features: [] launch_timestamp: 2023-08-02 10:30:35.545217477 UTC
```

It's confusing to read that line, then read the code and think "if
failpoints is true, but not in the features list, what does that mean?".
As far as I can tell, the check of `fail/failpoints` is just always
false because cargo doesn't expose features across crates like this:
the `fail/failpoints` syntax works in the cargo CLI but not from
a macro in some crate other than `fail`.
@jcsp jcsp added c/storage/pageserver Component: storage: pageserver a/tech_debt Area: related to tech debt labels Aug 2, 2023
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

1264 tests run: 1215 passed, 0 failed, 49 skipped (full report)


Flaky tests (1)

Postgres 15

  • test_crafted_wal_end[last_wal_record_crossing_segment]: debug

@jcsp jcsp marked this pull request as ready for review August 2, 2023 18:30
@jcsp jcsp requested review from a team as code owners August 2, 2023 18:30
@jcsp jcsp requested review from conradludgate and LizardWizzard and removed request for a team August 2, 2023 18:30
Copy link
Contributor

@LizardWizzard LizardWizzard left a comment

Choose a reason for hiding this comment

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

LGTM

As an alternative we can manually add failpoint feature flag into features list, but that probably doesnt worth the effort and doesnt make a big difference

@jcsp jcsp merged commit e3e739e into main Aug 4, 2023
@jcsp jcsp deleted the jcsp/redundant-feature-check branch August 4, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/tech_debt Area: related to tech debt c/storage/pageserver Component: storage: pageserver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants