BePPPower opened a new pull request, #11266:
URL: https://github.com/apache/doris/pull/11266

   …chema
   
   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   In some cases, we would like to check the status of `rowsets` and 
`segments`. So I add the `segments` table into information_schema database .
   The table schema of `segments` is:
   ```
   MySQL [(none)]> desc information_schema.segments;
   +-------------------+------------+------+-------+---------+-------+
   | Field             | Type       | Null | Key   | Default | Extra |
   +-------------------+------------+------+-------+---------+-------+
   | ROWSET_ID         | VARCHAR(*) | Yes  | false | NULL    |       |
   | TABLET_ID         | BIGINT     | Yes  | false | NULL    |       |
   | ROWSET_NUM_ROWS   | BIGINT     | Yes  | false | NULL    |       |
   | TXN_ID            | BIGINT     | Yes  | false | NULL    |       |
   | PARTITION_ID      | BIGINT     | Yes  | false | NULL    |       |
   | NUM_SEGMENTS      | BIGINT     | Yes  | false | NULL    |       |
   | START_VERSION     | BIGINT     | Yes  | false | NULL    |       |
   | END_VERSION       | BIGINT     | Yes  | false | NULL    |       |
   | INDEX_DISK_SIZE   | BIGINT     | Yes  | false | NULL    |       |
   | DATA_DISK_SIZE    | BIGINT     | Yes  | false | NULL    |       |
   | SEGMENT_VERSION   | BIGINT     | Yes  | false | NULL    |       |
   | SEGMENTS_NUM_ROWS | BIGINT     | Yes  | false | NULL    |       |
   +-------------------+------------+------+-------+---------+-------+
   ```
   
   and then we can search `rowsets` and `segments` info from `segments` table, 
like this:
   ```
   MySQL [(none)]> select * from information_schema.segments limit 10;
   
+--------------------------------------------------+-----------+-----------------+--------+--------------+--------------+---------------+-------------+-----------------+----------------+-----------------+-------------------+
   | ROWSET_ID                                        | TABLET_ID | 
ROWSET_NUM_ROWS | TXN_ID | PARTITION_ID | NUM_SEGMENTS | START_VERSION | 
END_VERSION | INDEX_DISK_SIZE | DATA_DISK_SIZE | SEGMENT_VERSION | 
SEGMENTS_NUM_ROWS |
   
+--------------------------------------------------+-----------+-----------------+--------+--------------+--------------+---------------+-------------+-----------------+----------------+-----------------+-------------------+
   | 0200000000000186ed4e15ad2de2d6c659b97e076eb43383 |     12583 |             
  5 |   1014 |        12580 |            1 |             2 |           2 |      
       147 |           1116 |               1 |                 5 |
   | 0200000000000190ed4e15ad2de2d6c659b97e076eb43383 |     12573 |             
831 |   1016 |        12548 |            1 |             2 |           2 |      
       614 |          78556 |               1 |               831 |
   | 0200000000000191ed4e15ad2de2d6c659b97e076eb43383 |     12571 |             
829 |   1016 |        12548 |            1 |             2 |           2 |      
       558 |          78484 |               1 |               829 |
   | 0200000000000189ed4e15ad2de2d6c659b97e076eb43383 |     12569 |             
835 |   1016 |        12548 |            1 |             2 |           2 |      
       573 |          79380 |               1 |               835 |
   | 020000000000018eed4e15ad2de2d6c659b97e076eb43383 |     12567 |             
844 |   1016 |        12548 |            1 |             2 |           2 |      
       590 |          79990 |               1 |               844 |
   | 020000000000018ced4e15ad2de2d6c659b97e076eb43383 |     12565 |             
846 |   1016 |        12548 |            1 |             2 |           2 |      
       615 |          80299 |               1 |               846 |
   | 020000000000018bed4e15ad2de2d6c659b97e076eb43383 |     12563 |             
823 |   1016 |        12548 |            1 |             2 |           2 |      
       580 |          77952 |               1 |               823 |
   | 020000000000018ded4e15ad2de2d6c659b97e076eb43383 |     12561 |             
842 |   1016 |        12548 |            1 |             2 |           2 |      
       582 |          79726 |               1 |               842 |
   | 0200000000000188ed4e15ad2de2d6c659b97e076eb43383 |     12559 |             
803 |   1016 |        12548 |            1 |             2 |           2 |      
       559 |          75996 |               1 |               803 |
   | 0200000000000192ed4e15ad2de2d6c659b97e076eb43383 |     12557 |             
823 |   1016 |        12548 |            1 |             2 |           2 |      
       629 |          78780 |               1 |               823 |
   
+--------------------------------------------------+-----------+-----------------+--------+--------------+--------------+---------------+-------------+-----------------+----------------+-----------------+-------------------+
   10 rows in set (0.58 sec)
   ```
   
   
   ## Checklist(Required)
   
   1. Type of your changes:
       - [ ] Improvement
       - [ ] Fix
       - [ ] Feature-WIP
       - [x] Feature
       - [ ] Doc
       - [ ] Refator
       - [ ] Others: 
   2. Does it affect the original behavior: 
       - [ ] Yes
       - [x] No
       - [ ] I don't know
   3. Has unit tests been added:
       - [ ] Yes
       - [x] No
       - [ ] No Need
   4. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [x] No Need
   5. Does it need to update dependencies:
       - [ ] Yes
       - [x] No
   6. Are there any changes that cannot be rolled back:
       - [ ] Yes
       - [x] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[d...@doris.apache.org](mailto:d...@doris.apache.org) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to