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

   Problem Summary:
   
   ## `Optimization only for random bucketing`
   
   ### Optimization points
   - add the random_tablet_switching_threshold property to the stream load, the 
default value is 10M (number of entries)
   - added the parameter random_distribution_tablet_switching_threshold
   - or a rondom bucketed table, with the default value false for the 
load_to_single_tablet attribute and the random_tablet_switching_threshold 
attribute set to 1000, two stream loads are performed. The table has only two 
buckets (tablets 001 and 002), and each load contains 600 records. These two 
loads will be imported into, for example, tablet 001. The third stream load 
will continue to import 600 records, which will be written to tablet 002.
   
   ### usage
   - schema
   ```sql
   CREATE TABLE IF NOT EXISTS test.test_size_based_tablet_switch (
             `k1` date NULL,
             `k2` text NULL,
             `k3` char(50) NULL,
             `k4` varchar(200) NULL,
             `k5` int(11) NULL
           ) ENGINE=OLAP
           DUPLICATE KEY(`k1`)
           COMMENT 'OLAP'
           DISTRIBUTED BY RANDOM BUCKETS 2
           PROPERTIES (
           "replication_allocation" = "tag.location.default: 1"
           );
   ```
   - `curl --location-trusted -u admin:'' -H "format: json" -H 
"read_json_by_line: true" -H "random_tablet_switching_threshold: 1000" -T 
/data/lage.json 
http://127.0.0.1:8030/api/test/test_size_based_tablet_switch/_stream_load`
   
   ### illustrate
   #### Write 600 records to the test_size_based_tablet_switch table three 
times. The first and second writes are written to tablet001, and the third 
write is written to tablet002.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to