Commit 914a009
Use string_view size for string stream memory accounting (facebookincubator#432)
Summary:
The new `NullableContentStringStreamData` chunker was using `sizeof(uint64_t)` (8 bytes) when calculating chunk sizes and memory usage, the batch reader consume string data using `std::string_view` (16 bytes). This mismatch causes memory regressions because chunk size calculations underestimate the actual memory footprint, leading to larger-than-expected chunks being created. This change uses `sizeof(std::string_view)` consistently across the chunking and stream data layers to protect readers that use string views from unexpected memory growth
Reviewed By: helfman
Differential Revision: D910161151 parent 0ecb7cc commit 914a009
File tree
5 files changed
+61
-20
lines changed- dwio/nimble/velox
- tests
5 files changed
+61
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
662 | | - | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
663 | 666 | | |
664 | 667 | | |
665 | 668 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
359 | 362 | | |
360 | | - | |
| 363 | + | |
361 | 364 | | |
362 | 365 | | |
363 | 366 | | |
364 | 367 | | |
365 | | - | |
| 368 | + | |
366 | 369 | | |
367 | 370 | | |
368 | 371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
1139 | 1139 | | |
1140 | 1140 | | |
1141 | 1141 | | |
1142 | | - | |
| 1142 | + | |
1143 | 1143 | | |
1144 | 1144 | | |
1145 | | - | |
1146 | | - | |
| 1145 | + | |
| 1146 | + | |
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | | - | |
1151 | | - | |
| 1150 | + | |
| 1151 | + | |
1152 | 1152 | | |
1153 | 1153 | | |
1154 | 1154 | | |
| |||
1220 | 1220 | | |
1221 | 1221 | | |
1222 | 1222 | | |
1223 | | - | |
| 1223 | + | |
| 1224 | + | |
1224 | 1225 | | |
1225 | 1226 | | |
1226 | 1227 | | |
| |||
1254 | 1255 | | |
1255 | 1256 | | |
1256 | 1257 | | |
1257 | | - | |
| 1258 | + | |
1258 | 1259 | | |
1259 | 1260 | | |
1260 | 1261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
551 | | - | |
| 551 | + | |
| 552 | + | |
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
395 | | - | |
| 396 | + | |
| 397 | + | |
396 | 398 | | |
397 | 399 | | |
398 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
399 | 417 | | |
400 | 418 | | |
401 | 419 | | |
| |||
415 | 433 | | |
416 | 434 | | |
417 | 435 | | |
| 436 | + | |
418 | 437 | | |
419 | 438 | | |
420 | 439 | | |
421 | 440 | | |
422 | 441 | | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
427 | 458 | | |
428 | 459 | | |
429 | 460 | | |
430 | 461 | | |
431 | | - | |
432 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
433 | 465 | | |
434 | 466 | | |
435 | 467 | | |
| |||
2248 | 2280 | | |
2249 | 2281 | | |
2250 | 2282 | | |
2251 | | - | |
| 2283 | + | |
| 2284 | + | |
2252 | 2285 | | |
2253 | 2286 | | |
2254 | 2287 | | |
| |||
0 commit comments