Skip to content

Comments

mds: emit warning with estimated replay time#55616

Merged
vshankar merged 4 commits intoceph:mainfrom
vshankar:log_estimated_journal_replay_time
Dec 27, 2024
Merged

mds: emit warning with estimated replay time#55616
vshankar merged 4 commits intoceph:mainfrom
vshankar:log_estimated_journal_replay_time

Conversation

@vshankar
Copy link
Contributor

It is helpful to get an estimate of how much time it might take to finish replaying the journal.

Fixes: https://tracker.ceph.com/issues/61863

Supersedes #52527

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@vshankar vshankar added the cephfs Ceph File System label Feb 16, 2024
@vshankar vshankar requested a review from a team February 16, 2024 12:05
@vshankar vshankar requested a review from a team as a code owner February 16, 2024 12:05
@vshankar vshankar force-pushed the log_estimated_journal_replay_time branch from fbc84d0 to b5246b4 Compare February 17, 2024 08:19
@vshankar
Copy link
Contributor Author

jenkins test make check

@vshankar vshankar force-pushed the log_estimated_journal_replay_time branch from b5246b4 to 7f63a76 Compare February 19, 2024 04:20
@vshankar
Copy link
Contributor Author

vshankar added a commit to vshankar/ceph that referenced this pull request Mar 4, 2024
* refs/pull/55616/head:
	mds: emit warning with estimated replay time
@vshankar
Copy link
Contributor Author

vshankar commented Mar 4, 2024

@vshankar
Copy link
Contributor Author

vshankar commented Mar 6, 2024

(dropping from current batch)

Copy link
Member

@batrick batrick left a comment

Choose a reason for hiding this comment

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

Also, I'd like to see the commit broken into:

  • mds: ...
  • qa: ...
  • PendingReleaseNotes,doc: ...

(we need release note)

@vshankar
Copy link
Contributor Author

Also, I'd like to see the commit broken into:

  • mds: ...
  • qa: ...
  • PendingReleaseNotes,doc: ...

(we need release note)

@batrick - This PR is mostly @manishym changes that I took over, so many comments from the original PR probably aren't incorporated. I'll plan to visit this soon.

@github-actions
Copy link

github-actions bot commented May 7, 2024

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@vshankar vshankar force-pushed the log_estimated_journal_replay_time branch from 7f63a76 to 9450bab Compare June 4, 2024 07:30
@vshankar
Copy link
Contributor Author

vshankar commented Jun 5, 2024

jenkins retest this please

@vshankar vshankar requested a review from batrick June 5, 2024 05:02
@batrick
Copy link
Member

batrick commented Jun 10, 2024

jenkins test make check

@batrick
Copy link
Member

batrick commented Jun 10, 2024

jenkins test api

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label Aug 11, 2024
@github-actions
Copy link

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions bot closed this Sep 10, 2024
@vshankar vshankar reopened this Nov 12, 2024
@github-actions github-actions bot removed the stale label Nov 12, 2024
@vshankar vshankar force-pushed the log_estimated_journal_replay_time branch from 2f78af0 to 0aa487c Compare November 12, 2024 07:50
@vshankar vshankar dismissed batrick’s stale review November 18, 2024 05:30

Comment addressed.

@vshankar
Copy link
Contributor Author

vshankar added a commit to vshankar/ceph that referenced this pull request Nov 20, 2024
* refs/pull/55616/head:
	PendingReleaseNotes: add note for replay completion warning
	qa: test to verify `MDS_ESTIMATED_REPLAY_TIME` warning
	doc: add a note for `MDS_ESTIMATED_REPLAY_TIME` MDS warning
	mds: emit warning for estinated replay time

Reviewed-by: Patrick Donnelly <[email protected]>
@vshankar vshankar force-pushed the log_estimated_journal_replay_time branch from 0aa487c to e5a9be4 Compare November 29, 2024 10:50
@vshankar vshankar requested review from a team as code owners November 29, 2024 10:50
@github-actions
Copy link

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@github-actions github-actions bot added the core label Nov 29, 2024
@vshankar vshankar force-pushed the log_estimated_journal_replay_time branch from e5a9be4 to 65acd39 Compare November 29, 2024 10:51
vshankar added a commit to vshankar/ceph that referenced this pull request Nov 29, 2024
* refs/pull/55616/head:
	PendingReleaseNotes: add note for replay completion warning
	qa: test to verify `MDS_ESTIMATED_REPLAY_TIME` warning
	doc: add a note for `MDS_ESTIMATED_REPLAY_TIME` MDS warning
	mds: emit warning for estinated replay time

Reviewed-by: Patrick Donnelly <[email protected]>
Comment on lines +244 to +261
auto total_bytes = write_pos - trimmed_pos;
double percent_complete = ((double)(read_pos - trimmed_pos)) / (double)total_bytes;
auto elapsed_time = std::chrono::duration_cast<std::chrono::seconds>
(ceph::coarse_mono_clock::now() - replay_start_time);
auto time = ((1 - percent_complete) / percent_complete) * elapsed_time;

dout(20) << __func__ << "percent_complete=" << percent_complete
<< ", elapsed_time=" << elapsed_time
<< ", estimated_time=" << std::chrono::round<std::chrono::seconds>(time)
<< dendl;

estimated_time.percent_complete = percent_complete * 100;
estimated_time.elapsed_time = elapsed_time;
estimated_time.estimated_time = std::chrono::round<std::chrono::seconds>(time);
dout(20) << __func__ << "estimated_time.percent_complete=" << estimated_time.percent_complete
<< ", estimated_time.elapsed_time=" << estimated_time.elapsed_time
<< ", estimated_time.estimated_time=" << estimated_time.estimated_time
<< dendl;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are there 2 log lines with almost the same info ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For debugging when I was trying to get the regex prefect. I'll remove it in a follow up PR once this change is merge (of course if nothing else stands out).

Copy link
Contributor

@mchangir mchangir left a comment

Choose a reason for hiding this comment

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

LGTM

@vshankar vshankar merged commit 2215d55 into ceph:main Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants