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

Nicolas Capponi
17.40.2014 9f27fd95ce75d56dbc011c4e02f8298bbabe6690
refs
author Nicolas Capponi <nicolas.capponi@forgerock.com>
Tuesday, June 17, 2014 15:40 +0200
committer Nicolas Capponi <nicolas.capponi@forgerock.com>
Tuesday, June 17, 2014 15:40 +0200
commit9f27fd95ce75d56dbc011c4e02f8298bbabe6690
tree b5a59bffa4aff02c7317c2ecc7dd0508690dbd42 tree | zip | gz
parent b40f02d21477bd0593809ef7e72797e8532072ca view | diff
OPENDJ-1449 : File-based changelog should handle partially written record left over from a previous failure
CR-3768

* 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
7 files modified
330 ■■■■ changed files
opendj-sdk/opends/src/messages/messages/replication.properties 8 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/file/BlockLogReader.java 73 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/file/FileReplicaDB.java 25 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/file/Log.java 21 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/file/LogFile.java 50 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/file/LogFileTest.java 148 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/file/LogTest.java 5 ●●●● diff | view | raw | blame | history