Commit 69e2524
Fix resource leak in IndexStoreFile shutdown (#9840)
* Fix resource leak in IndexStoreFile shutdown
Add cleanResources() calls after shutdown() for both mappedFile and compactMappedFile to ensure proper cleanup of memory-mapped buffers and file channels.
Change-Id: I2716b4e3b0cd281e89a9d5a00a389dc6048de3e7
Co-developed-by: Cursor <noreply@cursor.com>
* Add a FileNotFoundException check to allow breaking out of the loop after shutdown
Change-Id: Icc0063544ef91de8b2bd96a80f3829a6922cb0e6
* Add a FileNotFoundException check to allow breaking out of the loop after shutdown.
Change-Id: I53a7d2800775d80c1db8feb159c5c258b3517f09
---------
Co-authored-by: RongtongJin <user@example.com>
Co-authored-by: ShannonDing <dinglei@apache.org>1 parent 2017630 commit 69e2524
2 files changed
Lines changed: 24 additions & 14 deletions
File tree
- tieredstore/src/main/java/org/apache/rocketmq/tieredstore/index
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
246 | | - | |
| 247 | + | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
252 | | - | |
| 253 | + | |
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
| |||
436 | 437 | | |
437 | 438 | | |
438 | 439 | | |
| 440 | + | |
| 441 | + | |
439 | 442 | | |
440 | 443 | | |
441 | 444 | | |
| |||
482 | 485 | | |
483 | 486 | | |
484 | 487 | | |
485 | | - | |
| 488 | + | |
486 | 489 | | |
487 | 490 | | |
488 | 491 | | |
| |||
537 | 540 | | |
538 | 541 | | |
539 | 542 | | |
| 543 | + | |
540 | 544 | | |
541 | 545 | | |
542 | 546 | | |
| 547 | + | |
543 | 548 | | |
544 | | - | |
| 549 | + | |
545 | 550 | | |
546 | 551 | | |
547 | 552 | | |
| |||
Lines changed: 15 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
433 | 435 | | |
| 436 | + | |
| 437 | + | |
434 | 438 | | |
435 | 439 | | |
436 | 440 | | |
| |||
439 | 443 | | |
440 | 444 | | |
441 | 445 | | |
442 | | - | |
443 | | - | |
444 | 446 | | |
445 | 447 | | |
446 | 448 | | |
| 449 | + | |
| 450 | + | |
447 | 451 | | |
448 | 452 | | |
| 453 | + | |
449 | 454 | | |
450 | 455 | | |
451 | 456 | | |
0 commit comments