You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Julian Reschke (Jira)" <ji...@apache.org> on 2019/10/21 11:49:00 UTC

[jira] [Created] (OAK-8705) Broken logging in CopyOnWriteDirectory

Julian Reschke created OAK-8705:
-----------------------------------

             Summary: 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.8.17, 1.10.5
            Reporter: Julian Reschke


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)