[ https://issues.apache.org/jira/browse/OAK-8705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16963022#comment-16963022 ]
Thomas Mueller commented on OAK-8705: ------------------------------------- There is no 1.18 branch. In trunk, it was fixed in http://svn.apache.org/r1854565 (Mar 1, 2019), which is before Oak 1.18, so Oak 1.18 shouldn't be affected. (Right?). I will then close this issue and change the fix versions. > Broken logging in CopyOnWriteDirectory > -------------------------------------- > > Key: OAK-8705 > URL: https://issues.apache.org/jira/browse/OAK-8705 > Project: Jackrabbit Oak > Issue Type: Bug > Components: lucene > Affects Versions: 1.18.0, 1.10.5, 1.8.17 > Reporter: Julian Reschke > Assignee: Thomas Mueller > Priority: Minor > > In trunk: > {noformat} > oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/CopyOnWriteDirectory.java > 437- long remoteFileLength = remote.fileLength(name); > 438- validLocalCopyPresent = localFileLength == > remoteFileLength; > 439- > 440- if (!validLocalCopyPresent) { > 441: log.warn("COWRemoteFileReference::file ({}) differs > in length. local: {}; remote: {}, init-remote-length", > 442- name, localFileLength, remoteFileLength); > 443- } > 444- } else if (!IndexCopier.REMOTE_ONLY.contains(name)) { > 445- log.warn("COWRemoteFileReference::local file ({}) doesn't > exist", name); > {noformat} > (note the trailing "init-remote-length" that does not make any sense) > Worse, in 1.10 and 1.8: > {noformat} > oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/CopyOnWriteDirectory.java > 426- long remoteFileLength = remote.fileLength(name); > 427- validLocalCopyPresent = localFileLength == > remoteFileLength; > 428- > 429- if (!validLocalCopyPresent) { > 430: log.warn("COWRemoteFileReference::file ({}) differs > in length. local: {}; remote: {}, init-remote-length", > 431- localFileLength, remoteFileLength, length); > 432- } > 433- } else if (!IndexCopier.REMOTE_ONLY.contains(name)) { > 434- log.warn("COWRemoteFileReference::local file ({}) doesn't > exist", name); > {noformat} > (name parameter missing, so localFileLength is logged as filename) > Proposal: > - make this consistent everywhere > - either mention "init-remote-length" *and* log the value, or remove it from > the message > - (and fix the identation :-) -- This message was sent by Atlassian Jira (v8.3.4#803005)