Commit 1ba4042
authored
Fix the data loss issue that caused by the wrong entry log header (#4607)
* Fix the data loss issue that caused by the wrong entry log header
---
# Motivation
We observed numerous errors in the broker that failed to read
the ledger from the bookkeeper; although the ledger metadata
still exists, it was unable to read from the bookkeeper. After
checking the data, we found the ledger located entry log was
deleted by the bookkeeper. We have a data loss issue with the
bookkeeper.
The entry log file was deleted by the Garbage collector because
the entry log file wrote a wrong file header.
And there is an example that the shows the header is wrong:
```
Failed to get ledgers map index from: 82.log : Not all ledgers were found in ledgers map index. expected: -1932430239 -- found: 0 -- entryLogId: 82
```
* Add test1 parent 37b63c9 commit 1ba4042
File tree
4 files changed
+47
-1
lines changed- bookkeeper-server/src
- main/java/org/apache/bookkeeper/bookie
- test/java/org/apache/bookkeeper/bookie
4 files changed
+47
-1
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
1154 | 1158 | | |
1155 | 1159 | | |
1156 | 1160 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
842 | 842 | | |
843 | 843 | | |
844 | 844 | | |
845 | | - | |
846 | 845 | | |
847 | 846 | | |
848 | 847 | | |
849 | 848 | | |
| 849 | + | |
| 850 | + | |
850 | 851 | | |
851 | 852 | | |
852 | 853 | | |
| |||
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
394 | 434 | | |
395 | 435 | | |
396 | 436 | | |
| |||
0 commit comments