You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "freemandealer (via GitHub)" <gi...@apache.org> on 2026/01/21 06:49:37 UTC
[PR] [fix](filecache) avoid string_view::data() in file_cache_action [doris]
freemandealer opened a new pull request, #60101:
URL: https://github.com/apache/doris/pull/60101
std::string_view::data() does not guarantee a null-terminated string, which can cause out-of-bounds reads, undefined behavior, crashes, or even information leaks.
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
### 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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](filecache) avoid string_view::data() in file_cache_action [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #60101:
URL: https://github.com/apache/doris/pull/60101#issuecomment-3776757460
# BE UT Coverage Report
Increment line coverage `31.25% (5/16)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/4508ad699c15c220fda3ed251d7be7b0a15bbdbd_4508ad699c15c220fda3ed251d7be7b0a15bbdbd/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/4508ad699c15c220fda3ed251d7be7b0a15bbdbd_4508ad699c15c220fda3ed251d7be7b0a15bbdbd/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 52.39% (19046/36353) |
| Line Coverage | 35.70% (176432/494251) |
| Region Coverage | 32.23% (136583/423779) |
| Branch Coverage | 33.14% (59080/178267) |
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](filecache) avoid string_view::data() in file_cache_action [doris]
Posted by "freemandealer (via GitHub)" <gi...@apache.org>.
freemandealer commented on PR #60101:
URL: https://github.com/apache/doris/pull/60101#issuecomment-3776466268
run buildall
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](filecache) avoid string_view::data() in file_cache_action [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #60101:
URL: https://github.com/apache/doris/pull/60101#issuecomment-3786105620
# BE Regression && UT Coverage Report
Increment line coverage `0.00% (0/16)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/60101_4508ad699c15c220fda3ed251d7be7b0a15bbdbd_merge/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/60101_4508ad699c15c220fda3ed251d7be7b0a15bbdbd_merge/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 71.41% (25444/35632) |
| Line Coverage | 53.94% (266283/493697) |
| Region Coverage | 51.47% (220417/428285) |
| Branch Coverage | 52.93% (94764/179030) |
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](filecache) avoid string_view::data() in file_cache_action [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #60101:
URL: https://github.com/apache/doris/pull/60101#issuecomment-3783570289
PR approved by anyone and no changes requested.
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](filecache) avoid string_view::data() in file_cache_action [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #60101:
URL: https://github.com/apache/doris/pull/60101#issuecomment-3776638160
<details>
<summary>ClickBench: <b>Total hot run time: 26.83 s</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 4508ad699c15c220fda3ed251d7be7b0a15bbdbd, data reload: false
query1 0.05 0.04 0.05
query2 0.09 0.05 0.05
query3 0.26 0.09 0.08
query4 1.61 0.12 0.11
query5 0.28 0.25 0.26
query6 1.14 0.66 0.65
query7 0.03 0.03 0.03
query8 0.05 0.04 0.04
query9 0.56 0.50 0.49
query10 0.55 0.55 0.54
query11 0.15 0.10 0.10
query12 0.15 0.11 0.10
query13 0.61 0.59 0.58
query14 0.94 0.95 0.94
query15 0.80 0.79 0.77
query16 0.40 0.40 0.42
query17 1.04 1.02 1.05
query18 0.24 0.21 0.21
query19 1.88 1.91 1.89
query20 0.02 0.02 0.01
query21 15.43 0.24 0.14
query22 5.27 0.06 0.05
query23 15.91 0.27 0.10
query24 1.40 0.24 1.26
query25 0.15 0.08 0.06
query26 0.16 0.13 0.13
query27 0.06 0.08 0.06
query28 4.48 1.06 0.88
query29 12.53 3.92 3.17
query30 0.28 0.14 0.12
query31 2.87 0.62 0.40
query32 3.24 0.56 0.48
query33 3.05 2.98 3.03
query34 16.19 5.00 4.46
query35 4.41 4.41 4.47
query36 0.63 0.50 0.50
query37 0.11 0.07 0.06
query38 0.07 0.04 0.03
query39 0.05 0.03 0.03
query40 0.16 0.14 0.13
query41 0.08 0.03 0.03
query42 0.04 0.03 0.04
query43 0.04 0.04 0.04
Total cold run time: 97.46 s
Total hot run time: 26.83 s
```
</details>
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](filecache) avoid string_view::data() in file_cache_action [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #60101:
URL: https://github.com/apache/doris/pull/60101#issuecomment-3783570106
PR approved by at least one committer and no changes requested.
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](filecache) avoid string_view::data() in file_cache_action [doris]
Posted by "Thearas (via GitHub)" <gi...@apache.org>.
Thearas commented on PR #60101:
URL: https://github.com/apache/doris/pull/60101#issuecomment-3776465212
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR).
Please clearly describe your PR:
1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
3. What features were added. Why was this function added?
4. Which code was refactored and why was this part of the code refactored?
5. Which functions were optimized and what is the difference before and after the optimization?
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](filecache) avoid string_view::data() in file_cache_action [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #60101:
URL: https://github.com/apache/doris/pull/60101#issuecomment-3776623427
<details>
<summary>TPC-DS: <b>Total hot run time: 174011 ms</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 4508ad699c15c220fda3ed251d7be7b0a15bbdbd, data reload: false
query5 4374 622 483 483
query6 323 220 213 213
query7 4217 451 258 258
query8 343 242 254 242
query9 8697 2886 2859 2859
query10 496 372 329 329
query11 15320 15100 14860 14860
query12 174 128 115 115
query13 1270 486 418 418
query14 6124 3029 2763 2763
query14_1 2678 2665 2618 2618
query15 191 187 172 172
query16 988 470 470 470
query17 1071 630 542 542
query18 2462 420 324 324
query19 221 218 191 191
query20 115 110 113 110
query21 214 132 116 116
query22 3973 4025 3711 3711
query23 15968 15631 15248 15248
query23_1 15282 15361 15388 15361
query24 7140 1517 1156 1156
query24_1 1133 1158 1183 1158
query25 523 425 393 393
query26 1232 262 156 156
query27 2778 441 278 278
query28 4573 2151 2146 2146
query29 764 543 447 447
query30 323 235 202 202
query31 787 637 556 556
query32 88 77 75 75
query33 529 374 328 328
query34 891 872 543 543
query35 735 756 693 693
query36 871 894 856 856
query37 145 102 95 95
query38 2765 2748 2659 2659
query39 775 748 729 729
query39_1 725 707 720 707
query40 218 137 125 125
query41 76 72 73 72
query42 110 105 104 104
query43 435 481 410 410
query44 1312 748 752 748
query45 188 185 177 177
query46 821 948 578 578
query47 1440 1478 1411 1411
query48 319 344 245 245
query49 615 453 366 366
query50 625 277 203 203
query51 3800 3816 3788 3788
query52 107 108 95 95
query53 294 322 276 276
query54 312 278 271 271
query55 81 83 75 75
query56 320 315 318 315
query57 994 1022 901 901
query58 294 262 266 262
query59 2068 2193 2089 2089
query60 343 347 329 329
query61 171 167 167 167
query62 393 361 319 319
query63 299 272 273 272
query64 5024 1342 947 947
query65 3689 3649 3758 3649
query66 1431 414 316 316
query67 15534 15679 15499 15499
query68 2443 1076 758 758
query69 424 355 329 329
query70 955 964 920 920
query71 322 303 291 291
query72 5238 3180 3210 3180
query73 589 717 308 308
query74 8666 8730 8587 8587
query75 2743 2817 2467 2467
query76 2285 1070 629 629
query77 355 416 303 303
query78 9658 9772 9106 9106
query79 2862 880 586 586
query80 1749 577 483 483
query81 566 269 240 240
query82 998 148 111 111
query83 324 256 244 244
query84 253 113 98 98
query85 917 479 430 430
query86 410 325 321 321
query87 2852 2974 2773 2773
query88 3483 2592 2578 2578
query89 388 345 332 332
query90 1982 175 158 158
query91 160 164 138 138
query92 75 76 69 69
query93 1359 886 543 543
query94 641 305 285 285
query95 587 390 336 336
query96 642 497 230 230
query97 2356 2395 2297 2297
query98 229 207 201 201
query99 579 588 491 491
Total cold run time: 248593 ms
Total hot run time: 174011 ms
```
</details>
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](filecache) avoid string_view::data() in file_cache_action [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #60101:
URL: https://github.com/apache/doris/pull/60101#issuecomment-3776592019
<details>
<summary>TPC-H: <b>Total hot run time: 30951 ms</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 4508ad699c15c220fda3ed251d7be7b0a15bbdbd, data reload: false
------ Round 1 ----------------------------------
q1 17639 4177 4027 4027
q2 2049 339 235 235
q3 10137 1262 709 709
q4 10209 837 303 303
q5 7553 2105 1781 1781
q6 185 167 137 137
q7 931 783 664 664
q8 9275 1389 1062 1062
q9 4926 4644 4643 4643
q10 6771 1763 1385 1385
q11 540 297 322 297
q12 677 716 582 582
q13 17809 3831 3034 3034
q14 289 298 267 267
q15 582 500 504 500
q16 690 659 655 655
q17 665 861 396 396
q18 6637 6268 6355 6268
q19 1120 967 610 610
q20 379 355 242 242
q21 2945 2463 2210 2210
q22 998 1021 944 944
Total cold run time: 103006 ms
Total hot run time: 30951 ms
----- Round 2, with runtime_filter_mode=off -----
q1 4108 4018 4056 4018
q2 320 373 298 298
q3 2092 2601 2198 2198
q4 1315 1730 1311 1311
q5 4058 3981 3969 3969
q6 210 169 127 127
q7 1833 1828 1729 1729
q8 2677 2424 2369 2369
q9 7506 7300 7394 7300
q10 2563 2843 2405 2405
q11 576 494 470 470
q12 758 793 644 644
q13 3673 4207 3530 3530
q14 295 310 277 277
q15 547 587 576 576
q16 685 673 608 608
q17 1126 1355 1348 1348
q18 8164 7806 7584 7584
q19 887 853 854 853
q20 2043 2095 1946 1946
q21 4909 4361 4222 4222
q22 1061 1014 961 961
Total cold run time: 51406 ms
Total hot run time: 48743 ms
```
</details>
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](filecache) avoid string_view::data() in file_cache_action [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen merged PR #60101:
URL: https://github.com/apache/doris/pull/60101
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org