[MCOL-699] mcsadmin display issue for getModuleDisk Created: 2017-05-04 Updated: 2020-08-25 Resolved: 2017-05-22 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | 1.0.8, 1.1.0 |
| Fix Version/s: | 1.0.10, 1.1.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Chris Calender (Inactive) | Assignee: | David Hill (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 2017-10, 2017-11 |
| Description |
|
Minor mcsadmin display issue for getModuleDisk
^ This runs together making it less clear, its data1 412... |
| Comments |
| Comment by Chris Calender (Inactive) [ 2017-05-04 ] | |||||||||||||||||||||||||||
|
Looks like fix lies around line 8345 in /oamappps/mcsadmin/mcsadmin.cpp in function printModuleDisk(ModuleDisk moduledisk). However, from looking at the code, it almost seems as if everything is fixed width, so if a "Device name" is longer than 31?, then this will occur.
I'm not sure if you can just add another space in front of TotalBlocks (which is just after DeviceName), if a check on the length of DeviceName should be performed, or if this should be more dynamic in nature. | |||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-05-04 ] | |||||||||||||||||||||||||||
|
I was thinking something like "if length > 28 do '...right 28 bytes of string'" to indicate a truncation and the most significant part still showing. Assigning to Hill as it would be better for him to decide how this should look. | |||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2017-05-13 ] | |||||||||||||||||||||||||||
|
Adding this to line 8345 should work (fixed how Andrew suggested):
Diff:
I'd love to be able to contribute a patch, officially, so please let me know what I can do to make this happen! And/or if you'd prefer this be fixed in a different manner, please let me know. | |||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2017-05-13 ] | |||||||||||||||||||||||||||
|
This changed the output from:
To:
| |||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2017-05-13 ] | |||||||||||||||||||||||||||
|
Note that I opted for the 1-line fix over a more readable if/else. I'd be happy to change it to whatever you prefer, of course. | |||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-05-13 ] | |||||||||||||||||||||||||||
|
Hi Chris, Absolutely you can contribute. You need a github account to do this: 1. Go to https://github.com/mariadb-corporation/mariadb-columnstore-engine If you get stuck at any point please let us know. | |||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-05-13 ] | |||||||||||||||||||||||||||
|
As for preference. We would prefer an 'if' to be broken up into multi lines for readability if possible. | |||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2017-05-13 ] | |||||||||||||||||||||||||||
|
Andrew - awesome, many thanks for all of the feedback! Most appreciated Okay, for the if/else, then this should work in place of line 8345:
I'll have to start working on the github portion now. | |||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-05-15 ] | |||||||||||||||||||||||||||
|
Review request for Chris' pull request which has the behaviour indicated in his comments. | |||||||||||||||||||||||||||
| Comment by David Hill (Inactive) [ 2017-05-15 ] | |||||||||||||||||||||||||||
|
pull request reviewed | |||||||||||||||||||||||||||
| Comment by David Hill (Inactive) [ 2017-05-15 ] | |||||||||||||||||||||||||||
|
also back ported to 1.0.10 commit d5078663c8f9c7fb80ff7a4be2bcc4082df74444 oamapps/mcsadmin/mcsadmin.cpp | 6 +++++- | |||||||||||||||||||||||||||
| Comment by David Hill (Inactive) [ 2017-05-22 ] | |||||||||||||||||||||||||||
|
testing on amazon with ebs storage... reproduced the issue in 1.0.9, will install and test in 1.0.10 mcsadmin> getSystemDisk System Disk Usage per Module Module 'pm1' Disk Usage (in 1K blocks) Mount Point Total Blocks Used Blocks Usage % | |||||||||||||||||||||||||||
| Comment by David Hill (Inactive) [ 2017-05-22 ] | |||||||||||||||||||||||||||
|
fixed mcsadmin> getSystemDisk System Disk Usage per Module Module 'pm1' Disk Usage (in 1K blocks) Mount Point Total Blocks Used Blocks Usage % |