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

MDEV-34900: Fix stage names for profiling #3594

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

Conversation

SaitejSamudrala
Copy link

@SaitejSamudrala SaitejSamudrala commented Oct 24, 2024

  • The Jira issue number for this PR is: MDEV-34900

Description

This PR addresses MDEV-34900 by renaming stage_executing to "Prepare for executing" and stage_sending_data to "executing" in JOIN::exec_inner() to better reflect the actual process during profiling.

Release Notes

Renaming few of the profiler stages.

If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

@CLAassistant
Copy link

CLAassistant commented Oct 24, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@grooverdan grooverdan left a comment

Choose a reason for hiding this comment

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

Thank you for your first contribution to MariaDB.

Code looks correct.

If you git grep 'Sending data' you'll see quite a few test cases that are dependant on this test. Likely they will fail. Test can be re-recorded with mysql-test/mtr --record innodb.innodb-lock as example. This will update a .result file. git commit --amend {these files} to include them in your previous commit message and git push --force to update this PR.

Also improve the commit message by starting the the MDEV, like you did for the PR title. Include in the message the rational for the change (straight from JIRA entry is fine).

Once that happens, we'll look again at how the CI ran against these changes.

FYI: I looked at stage_sending_data in sql/sql_admin.cc and I think it can stay as is.

@cvicentiu cvicentiu self-requested a review October 25, 2024 04:55
Copy link
Member

@cvicentiu cvicentiu left a comment

Choose a reason for hiding this comment

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

Approve for running in CI

@RazvanLiviuVarzaru
Copy link

@SaitejSamudrala Thank you for your contribution! Can you also please sign the Contributor License Agreement? Thanks!

@SaitejSamudrala
Copy link
Author

SaitejSamudrala commented Oct 25, 2024

Thank you for your first contribution to MariaDB.

Code looks correct.

If you git grep 'Sending data' you'll see quite a few test cases that are dependant on this test. Likely they will fail. Test can be re-recorded with mysql-test/mtr --record innodb.innodb-lock as example. This will update a .result file. git commit --amend {these files} to include them in your previous commit message and git push --force to update this PR.

Also improve the commit message by starting the the MDEV, like you did for the PR title. Include in the message the rational for the change (straight from JIRA entry is fine).

Once that happens, we'll look again at how the CI ran against these changes.

FYI: I looked at stage_sending_data in sql/sql_admin.cc and I think it can stay as is.

where state = 'Sending data' and
info = 'SELECT * FROM t1 FOR UPDATE'
Id	User	Host	db	Command	Time	State	Info	Progress
4	root	localhost	test	Sleep	30		NULL	0.000
5	root	localhost	test	Query	30	Executing	SELECT * FROM t1 FOR UPDATE	0.000
6	root	localhost	test	Query	0	starting	show full processlist	0.000

Hi, these are the changes in the .result file I am getting after running mysql-test/mtr --record innodb.innodb-lock is this the intended result or am I making a mistake here.Thanks.

@grooverdan
Copy link
Member

grooverdan commented Oct 25, 2024

Ah, if related to the state, Sending data is in a .test file change this, then re-record. Hopefully result change will just be a text change of the Sending data. There may be cases where the result doesn't change and that's ok too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants