void-ptr974 opened a new pull request, #4803:
URL: https://github.com/apache/bookkeeper/pull/4803
### Motivation
`DefaultEntryLogger.incompleteCompactionLogs()` reconstructs a recovered
compaction log from `*.compacted` files. The destination log id is parsed from
a hex entry-log filename, but the recovered final `.log` path was rebuilt with
the numeric id's decimal string.
For destination log ids >= 10, recovery could try to make a decimal-named
log available, such as `10.log` for log id 10, while the rest of the entry
logger expects the hex name `a.log`. This can prevent transactional compaction
recovery from scanning the recovered log, leaving the compacted marker and old
entry log behind.
### Changes
- Rebuild recovered compaction final log filenames with
`logId2HexString(compactionLogId)`.
- Add coverage for recovered compacted logs whose destination ids require
hex filenames:
- log id 10: `a.log`, not `10.log`
- log id 16: `10.log`, not `16.log`
- Verify the recovered compaction log can be made available and scanned
through the recovered log id.
### Testing
- `mvn -pl bookkeeper-server
-Dtest=DefaultEntryLogTest#testRecoverCompactedLogUsesHexFinalLogFileNameForLogIdTen+testRecoverCompactedLogUsesHexFinalLogFileNameForLogIdSixteen
test`
- `mvn -pl bookkeeper-server -Dtest=DefaultEntryLogTest test`
--
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]