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

fix: correctly display the disk mount points of tiflash #1649

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

mornyx
Copy link
Collaborator

@mornyx mornyx commented Feb 28, 2024

close: #1625

In the past, the data directory of tiflash was only obtained from engine-store.path. This PR modified it to be obtained from both engine-store.path, engine-store.storage.main.dir and engine-store.storage.latest.dir.

Signed-off-by: mornyx <mornyx.z@gmail.com>
@ti-chi-bot ti-chi-bot bot requested a review from Renkai February 28, 2024 03:20
@ti-chi-bot ti-chi-bot bot added the size/M label Feb 28, 2024
Copy link

netlify bot commented Feb 28, 2024

Deploy Preview for tidb-dashboard canceled.

Name Link
🔨 Latest commit 1a8677b
🔍 Latest deploy log https://app.netlify.com/sites/tidb-dashboard/deploys/65dea68a6936ee0007ac6a9c

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 37 lines in your changes are missing coverage. Please review.

Project coverage is 24.05%. Comparing base (b7e594c) to head (1a8677b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1649      +/-   ##
==========================================
- Coverage   24.12%   24.05%   -0.07%     
==========================================
  Files         173      173              
  Lines       15717    15749      +32     
==========================================
- Hits         3791     3788       -3     
- Misses      11642    11677      +35     
  Partials      284      284              
Flag Coverage Δ
backend_integration 9.13% <0.00%> (-0.06%) ⬇️
backend_ut 26.24% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7e594c...1a8677b. Read the comment docs.

Comment on lines +62 to +65
case "engine-store.storage.main.dir", "engine-store.storage.latest.dir":
if err := json.Unmarshal([]byte(row.Value), &paths); err != nil {
return err
}
Copy link

@JaySon-Huang JaySon-Huang Feb 28, 2024

Choose a reason for hiding this comment

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

"engine-store.storage.main.dir", "engine-store.storage.latest.dir" These two configs can be set simultaneously. In this case, we need to merge the two array to paths into a set.

mountDir := locateInstanceMountPartition(path, m[hostname].Partitions)
if mountDir != "" {
m[hostname].Instances[row.Instance].PartitionPathL = strings.ToLower(mountDir)
break

Choose a reason for hiding this comment

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

If a TiFlash instance is deployed on multiple disks (MountPartition), can we show all mount point usage of that TiFlash instance?

@ti-chi-bot ti-chi-bot bot added the lgtm label Feb 28, 2024
Copy link
Contributor

ti-chi-bot bot commented Feb 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: baurine

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

ti-chi-bot bot commented Feb 28, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-28 06:23:20.520613863 +0000 UTC m=+1029489.268236966: ☑️ agreed by baurine.

@ti-chi-bot ti-chi-bot bot added the approved label Feb 28, 2024
@ti-chi-bot ti-chi-bot bot merged commit e830b45 into master Feb 28, 2024
13 of 16 checks passed
@ti-chi-bot ti-chi-bot bot deleted the mornyx/tiflash-disk-info branch February 28, 2024 06:24
@mornyx
Copy link
Collaborator Author

mornyx commented Feb 28, 2024

/cherry-pick release-7.1

@mornyx
Copy link
Collaborator Author

mornyx commented May 27, 2024

/cherry-pick release-7.5

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.

Dashboard can not display the disk info correctly when tiflash is deployed on multiple disks
4 participants