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

2019-10-30 Thread Thomas Mueller (Jira)


 [ 
https://issues.apache.org/jira/browse/OAK-8705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Mueller updated OAK-8705:

Fix Version/s: 1.18.0
   1.10.6
   1.8.18

> 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
> Fix For: 1.18.0, 1.8.18, 1.10.6
>
>
> 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)


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

2019-10-30 Thread Thomas Mueller (Jira)


 [ 
https://issues.apache.org/jira/browse/OAK-8705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Mueller updated OAK-8705:

Affects Version/s: (was: 1.18.0)

> 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.10.5, 1.8.17
>Reporter: Julian Reschke
>Assignee: Thomas Mueller
>Priority: Minor
> Fix For: 1.18.0, 1.8.18, 1.10.6
>
>
> 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)


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

2019-10-21 Thread Julian Reschke (Jira)


 [ 
https://issues.apache.org/jira/browse/OAK-8705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Reschke updated OAK-8705:

Affects Version/s: 1.18.0

> 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
>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)