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

WT-13912 Create a new checkpoint struct dedicated to handles information #11347

Merged
merged 8 commits into from
Dec 20, 2024

Conversation

etienneptl
Copy link
Contributor

@etienneptl etienneptl commented Dec 18, 2024

The changes introduce a new struct called WT_CKPT_HANDLE_STATS that contains all the information related to handles needed by the checkpoint. The existing WT_CKPT_CONNECTION struct has been updated to use the new struct.

@etienneptl etienneptl self-assigned this Dec 18, 2024
Copy link

github-actions bot commented Dec 18, 2024

Thanks for creating a pull request! Please answer the questions below by editing this comment.

Type of change made in this PR

  • Functional change
  • Test-only change
  • Refactor-only change
  • Other non-functional change

What makes this change safe?

Answering this question helps the reviewers understand where they should focus their attention. Please consider these prompts:

  • How risky is this change? Why?
    Not risky, just encapsulating fields inside a new struct.
  • What tests are you adding, changing or relying on? Why?
    I will rely on the existing tests as it's a refactor-only change.
  • What, if anything, are you concerned about that you'd like the reviewer to focus on?
    I am only concerned about the name, please let me know if there's something more suitable.

References:

Checklist before requesting a review

  • I have performed a self-review of my code.
  • I have made corresponding changes to the documentation, or no documentation change is needed.
  • I have tests that show my change is correct, or have described above why functional test changes are not required.

@etienneptl etienneptl changed the title WT13912 Create a new checkpoint struct dedicated to handles information WT-13912 Create a new checkpoint struct dedicated to handles information Dec 18, 2024
src/include/wt_internal.h Outdated Show resolved Hide resolved
wt_shared wt_off_t logsize; /* Checkpoint log size period */
bool signalled; /* Checkpoint signalled */

WT_CKPT_HANDLE handle;
Copy link
Contributor Author

@etienneptl etienneptl Dec 18, 2024

Choose a reason for hiding this comment

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

Should I make this plural?

Suggested change
WT_CKPT_HANDLE handle;
WT_CKPT_HANDLES handles; /* Checkpoint handles */

Copy link
Contributor

Choose a reason for hiding this comment

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

The content of the struct doesn't look like there are many handles.
And it doesn't seem to be a handle. I'd rather call it "stats" or something like that.

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 am not sure if I understand correctly your comment or I misunderstood the fields. AFAIK, those fields reflect stats (indeed) about all the dhandles the checkpoint is currently dealing with. It could be one or thousands.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, after seeing @sueloverso's comment and looking at other structures we have in the code, your comment makes sense @ershov, sorry.
@sueloverso, it seems that we use *_info much less than *_stats, would you be ok with WT_CKPT_HANDLE_STATS?

Copy link
Member

Choose a reason for hiding this comment

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

I'm good with _STATS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed in 6f129f9

Copy link

wiredtiger-prbot bot commented Dec 18, 2024

Test coverage is ok, please refer to the Code change/coverage report links below and try to improve it if feasible.

Metric (for added/changed code) Coverage
Line coverage 100% (25/25)
Branch coverage 75% (27/36)

⚠️ This PR touches methods that have an extremely high complexity score!

Copy link
Member

@sueloverso sueloverso left a comment

Choose a reason for hiding this comment

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

I have one naming question/comment. The change overall LGTM.

src/checkpoint/checkpoint.h Outdated Show resolved Hide resolved
struct __wt_ckpt_handle_stats {
uint64_t apply; /* handles applied */
uint64_t apply_time; /* applied handles gather time */
uint64_t drop; /* handles drop */
Copy link
Contributor

@Sean04 Sean04 Dec 19, 2024

Choose a reason for hiding this comment

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

Some of these are past tense and others are present, could we change them to be consistent. I don't mind which way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in be24b26

Copy link
Contributor

@Sean04 Sean04 left a comment

Choose a reason for hiding this comment

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

LGTM, with one suggestion

Copy link
Contributor

@ershov ershov left a comment

Choose a reason for hiding this comment

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

Good change, thanks Etienne!

@etienneptl etienneptl force-pushed the WT-13912-create-ckpt-struct-handles branch from 9ec3e7e to d4d1908 Compare December 19, 2024 22:58
@etienneptl etienneptl enabled auto-merge December 19, 2024 22:59
@etienneptl etienneptl added this pull request to the merge queue Dec 19, 2024
Merged via the queue into develop with commit 8f132ef Dec 20, 2024
10 checks passed
@etienneptl etienneptl deleted the WT-13912-create-ckpt-struct-handles branch December 20, 2024 00:00
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.

4 participants