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

[Feature] add show processlist from xxx command to show process list of specify frondend #13326

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

guangxuCheng
Copy link
Contributor

…all frontends

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Which issues of this PR fixes :

Fixes #13312

Problem Summary(Required) :

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr will affect users' behaviors
  • This pr needs user documentation (for new or modified features or behaviors)
  • I have added documentation for my new feature or new function

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 13, 2022
@guangxuCheng guangxuCheng changed the title [Feature] add show all processlist command to show process list of … [Feature] add show processlist from all command to show process list of … Nov 16, 2022
@guangxuCheng guangxuCheng changed the title [Feature] add show processlist from all command to show process list of … [Feature] add show processlist from xxx command to show process list of specify frondend Nov 16, 2022
@@ -12,9 +12,10 @@
public class ShowProcesslistStmt extends ShowStmt {
private static final ShowResultSetMetaData META_DATA =
ShowResultSetMetaData.builder()
.addColumn(new Column("FeHost", ScalarType.createVarchar(16)))
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a command from MySQL.
I think the output should be the same as MySQL's. Then other BIs or management tools can recognize the results.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, the META_DATA has already add two new column ConnectionStartTime and IsPending which different from mysql protocol.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And, If no new column is added, it is impossible to determine which frondend the session belongs to

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@imay take a look? how to deal with this?

Copy link
Contributor

Choose a reason for hiding this comment

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

how about put FeHost at the end of all columns?

Copy link
Contributor

@imay imay Nov 18, 2022

Choose a reason for hiding this comment

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

Is it better to name it AccessAddress?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Named FeHost will be more easier to understand?

.addColumn(new Column("Id", ScalarType.createType(PrimitiveType.BIGINT)))
.addColumn(new Column("User", ScalarType.createVarchar(16)))
.addColumn(new Column("Host", ScalarType.createVarchar(16)))
.addColumn(new Column("ClientHost", ScalarType.createVarchar(16)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Should use Host to be compatible with MySQL output

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will Keep current name "Host"

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@EsoragotoSpirit EsoragotoSpirit removed their assignment Mar 6, 2023
@DanRoscigno DanRoscigno removed the documentation Improvements or additions to documentation label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] add show processlist from all to show all process of all frontend
5 participants