OPENDJ-889 Regression: access logger not logging replayed synchronization operations when it should be
Code review: matthew
AbstractTextAccessLogPublisher.java:
Fixed the bug by coming back a bit to what the old code was doing (it is not totally comparable).
AbstractTextAccessLogPublisherTest.java:
Updated the test.
| | |
| | | */ |
| | | boolean isLoggable(final Operation operation) |
| | | { |
| | | return !((suppressInternalOperations && operation.isInnerOperation()) |
| | | || (suppressSynchronizationOperations |
| | | && operation.isSynchronizationOperation())); |
| | | if (operation.isSynchronizationOperation()) |
| | | { |
| | | return !suppressSynchronizationOperations; |
| | | } |
| | | else if (operation.isInnerOperation()) |
| | | { |
| | | return !suppressInternalOperations; |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | | |
| | |
| | | @DataProvider(name = "isLoggableData") |
| | | public Object[][] getIsLoggableData() |
| | | { |
| | | // when suppress is set to true and the corresponding operation is set to |
| | | // When suppress is set to true and the corresponding operation is set to |
| | | // true too, then the operation is not loggable. |
| | | // You can read the array like this: read two by two from line start, if |
| | | // both are true in a pair, then the expected result is false (not loggable) |
| | | // both are true in a pair, then the expected result is false (not |
| | | // loggable). |
| | | // There is just one exception: when the operation is a synchronization |
| | | // operation and we do not suppress synchronization operation, then we |
| | | // return true regardless of whether this is an internal operation |
| | | return new Object[][] { |
| | | { true, true, true, true, false }, |
| | | { true, true, true, false, false }, |
| | |
| | | { true, false, true, false, true }, |
| | | { true, false, false, true, true }, |
| | | { true, false, false, false, true }, |
| | | { false, true, true, true, false }, |
| | | { false, true, true, true, true }, |
| | | { false, true, true, false, true }, |
| | | { false, true, false, true, true }, |
| | | { false, true, false, false, true }, |