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

[Enhancement] show persistent index disk cost in be_tablets (backport #35615) #36280

Merged
merged 2 commits into from
Dec 2, 2023

Conversation

luohaha
Copy link
Contributor

@luohaha luohaha commented Dec 1, 2023

backport #34898 #35615

What type of PR is this:

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

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

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

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.2
    • 3.1
    • 3.0
    • 2.5

Why I'm doing:
Because when we execute `show data`, we will find that `.cols` (generate by partial column update or generated column) and persistent index file size aren't included.

What I'm doing:
Keep tracing the file size of  `.cols` and persistent index files.

Signed-off-by: luohaha <[email protected]>
…s#35615)

We can't get the persistent index disk usage from system table now.
Add each tablet's persistent index disk usage `INDEX_DISK` to `be_tablets`.

```
mysql> select * from be_tablets where tablet_id = 10121\G
*************************** 1. row ***************************
       BE_ID: 10004
    TABLE_ID: 10119
PARTITION_ID: 10118
   TABLET_ID: 10121
 NUM_VERSION: 4
 MAX_VERSION: 6
 MIN_VERSION: 4
  NUM_ROWSET: 1
     NUM_ROW: 5
   DATA_SIZE: 710
   INDEX_MEM: 119
 CREATE_TIME: 1700701817
       STATE: RUNNING
        TYPE: PRIMARY
    DATA_DIR: /home/disk5/luoyixin/starrocks-4/starrocks/output/be/storage
    SHARD_ID: 48
 SCHEMA_HASH: 1872891624
  INDEX_DISK: 152
1 row in set (0.02 sec)
```
@mergify mergify bot assigned luohaha Dec 1, 2023
Copy link

sonarcloud bot commented Dec 1, 2023

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 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.21) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

Copy link

github-actions bot commented Dec 1, 2023

[FE Incremental Coverage Report]

pass : 1 / 1 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/catalog/system/information/BeTabletsSystemTable.java 1 1 100.00% []

Copy link

github-actions bot commented Dec 1, 2023

[BE Incremental Coverage Report]

fail : 4 / 38 (10.53%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 src/exec/schema_scanner/schema_be_tablets_scanner.cpp 0 4 00.00% [95, 173, 179, 190]
🔵 src/storage/tablet_updates.cpp 4 34 11.76% [2443, 2444, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2456, 2459, 2460, 2461, 2462, 2464, 2465, 2466, 2467, 2470, 2471, 2472, 2473, 2474, 2518, 2520, 2521, 2525, 2533, 3516, 3525]

@chaoyli chaoyli merged commit f13de63 into StarRocks:branch-3.0 Dec 2, 2023
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants