mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
22.14.2014 1c4d8575e85a9eb67741e42f27f95a7a198542c4
OPENDJ-1449 : File-based changelog should handle partially written record left over from a previous failure
CR-3768

[Merge r10816 for Nicolas Capponi]
[Note: real merge of all changelog.file package content to be done in one shot in
a future commit]

* LogFile.java
** Add a check of file validity in constructor when log file is write-enabled
** Recover the file if it is corrupted (partially written record) by truncating it

* BlockLogReader.java
** Add method checkLogIsValid() to check validity of file

* replication.properties
** Add new messages related to check and recovery

* LogFileTest.java
** Add tests for recovery after log file corruption

* Minor changes in other files
1 files modified
8 ■■■■ changed files
opendj3-server-dev/src/messages/messages/replication.properties 8 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/messages/messages/replication.properties
@@ -617,4 +617,10 @@
 replica offline state file '%s' for domain %s
ERR_CHANGELOG_UNABLE_TO_DELETE_REPLICA_OFFLINE_STATE_FILE_281=Could not delete replica \
 offline state file '%s' for domain %s and server id %d
ERR_CHANGELOG_UNABLE_TO_RETRIEVE_FILE_LENGTH_282=Could not retrieve file length of file '%s'
ERR_CHANGELOG_UNABLE_TO_RETRIEVE_FILE_LENGTH_282=Could not retrieve file length of log file '%s'
ERR_CHANGELOG_UNABLE_TO_RECOVER_LOG_FILE_283=An error occurred while recovering the \
 replication change log file '%s'. The recovery has been aborted and this replication server \
 will be removed from the replication topology. The change log file system may be read-only, \
 full, or corrupt and must be fixed before this replication server can be used. The underlying error was: %s
INFO_CHANGELOG_LOG_FILE_RECOVERED_284=Log file '%s' was successfully \
 recovered by removing a partially written record