Description
Bug Report
What did you do?
Deployed TiDB cluster with TiFlash. Went to the "Cluster Info" page of TiDB Dashboard.
What did you expect to see?
Should show the disk mount directory of TiFlash configured in topology.
What did you see instead?
Another mount point on the same host.
What version of TiDB Dashboard are you using (./tidb-dashboard --version
)?
v6.5.1
Source code analysis and fix advise
Seems like once there are other points with longer paths than the TiFlash one, it will show the longest one. The special "HACK" logic for TiFlash in FillFromClusterHardwareTable() just matches the mentioned behavior. Shall we just remove the special processing for TiFlash in FillFromClusterHardwareTable() and add query condition for TiFlash like "OR (TYPE
= 'tiflash' AND KEY
= 'engine-store.path')" in FillInstances()? Tried the fix locally and the correct mount point was shown. Please double confirm.