You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by merlimat <gi...@git.apache.org> on 2017/05/10 18:08:08 UTC

[GitHub] bookkeeper pull request #145: BOOKKEEPER-1057: Do not log error message afte...

GitHub user merlimat opened a pull request:

    https://github.com/apache/bookkeeper/pull/145

    BOOKKEEPER-1057: Do not log error message after read failure in PendingReadOp

    In PendingReadOp, there is an error message that is printed each time a read on a specific bookie is failing:
    
    ```java
    LOG.error("Read of ledger entry failed: L{} E{}-E{}, Heard from {}. First unread entry is {}",
        new Object[] { lh.getId(), startEntryId, endEntryId, heardFromHosts, firstUnread });
    ```
    
    This message is getting printed each time a ledger is recovered and there is no error, since the ledger recovery logic is to keep reading and incrementing the entryId until a NoEntry error is received.
    
    This log message should be set at debug level.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/merlimat/bookkeeper debug-message

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/bookkeeper/pull/145.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #145
    
----
commit 30d94f2325882d5d41c4d3eb92b3e05c5393538b
Author: Matteo Merli <mm...@apache.org>
Date:   2016-01-12T18:05:01Z

    BOOKKEEPER-1057: Do not log error message after read failure in PendingReadOp

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] bookkeeper issue #145: BOOKKEEPER-1057: Do not log error message after read ...

Posted by jvrao <gi...@git.apache.org>.
Github user jvrao commented on the issue:

    https://github.com/apache/bookkeeper/pull/145
  
    What about the regular read failure? We need a way to print the error message on regular read request and ignore in recovery case or where we try to read beyond LAC. Changing to default by default doesn't serve the purpose. so, -1 from me.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] bookkeeper issue #145: BOOKKEEPER-1057: Do not log error message after read ...

Posted by merlimat <gi...@git.apache.org>.
Github user merlimat commented on the issue:

    https://github.com/apache/bookkeeper/pull/145
  
    > That's exactly my point. Can we use this opportunity to do the right fix
    instead of masking real errorcases?
    
    I was agreeing with you :)
    
    Let me think a bit how to differentiate the 2 reading types there.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] bookkeeper issue #145: BOOKKEEPER-1057: Do not log error message after read ...

Posted by eolivelli <gi...@git.apache.org>.
Github user eolivelli commented on the issue:

    https://github.com/apache/bookkeeper/pull/145
  
    @merlimat @jvrao  new ideas ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] bookkeeper issue #145: BOOKKEEPER-1057: Do not log error message after read ...

Posted by eolivelli <gi...@git.apache.org>.
Github user eolivelli commented on the issue:

    https://github.com/apache/bookkeeper/pull/145
  
    @jvrao @merlimat 
    IHMO In case of a failed bookie it is not good to spam logs with errors. It is enough that the method returns an error code.
    
    I am OK if you prefer to distinguish the pointed case of "recovery" from the other cases.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] bookkeeper issue #145: BOOKKEEPER-1057: Do not log error message after read ...

Posted by jvrao <gi...@git.apache.org>.
Github user jvrao commented on the issue:

    https://github.com/apache/bookkeeper/pull/145
  
    We (plan to) use error messages to do a lot of post processing. We would
    like to see all errors logged as it has much more information than pure log
    message.
    
    On Wed, May 10, 2017 at 11:55 PM, Enrico Olivelli <no...@github.com>
    wrote:
    
    > @jvrao <https://github.com/jvrao> @merlimat <https://github.com/merlimat>
    > IHMO In case of a failed bookie it is not good to spam logs with errors.
    > It is enough that the method returns an error code.
    >
    > I am OK if you prefer to distinguish the pointed case of "recovery" from
    > the other cases.
    >
    > —
    > You are receiving this because you were mentioned.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/bookkeeper/pull/145#issuecomment-300699854>,
    > or mute the thread
    > <https://github.com/notifications/unsubscribe-auth/AAChrnYyIYzjZAaTTALDvpBzBJOxi0WVks5r4rD4gaJpZM4NXBv9>
    > .
    >
    
    
    
    -- 
    Jvrao
    ---
    First they ignore you, then they laugh at you, then they fight you, then
    you win. - Mahatma Gandhi



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] bookkeeper issue #145: BOOKKEEPER-1057: Do not log error message after read ...

Posted by merlimat <gi...@git.apache.org>.
Github user merlimat commented on the issue:

    https://github.com/apache/bookkeeper/pull/145
  
    @jvrao I agree with the point of separating the recovery vs non-recovery. 
    
    At yahoo we were using log sniffer to get alerts from all error messages. If an error message is not symptom of something wrong that require some operator action, then it only adds to noise. 
    
    In the specific, since you cannot distinguish, just by seeing this error messages, whether something was _really_ wrong or everything is ok.. the error message is not useful.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] bookkeeper issue #145: BOOKKEEPER-1057: Do not log error message after read ...

Posted by jvrao <gi...@git.apache.org>.
Github user jvrao commented on the issue:

    https://github.com/apache/bookkeeper/pull/145
  
    On Thu, May 11, 2017 at 8:09 AM Matteo Merli <no...@github.com>
    wrote:
    
    > @jvrao <https://github.com/jvrao> I agree with the point of separating
    > the recovery vs non-recovery.
    >
    > At yahoo we were using log sniffer to get alerts from all error messages.
    > If an error message is not symptom of something wrong that require some
    > operator action, then it only adds to noise.
    >
    > In the specific, since you cannot distinguish, just by seeing this error
    > messages, whether something was *really* wrong or everything is ok.. the
    > error message is not useful.
    >
    >
    That's exactly my point. Can we use this opportunity to do the right fix
    instead of masking real errorcases?
    
    —
    > You are receiving this because you were mentioned.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/bookkeeper/pull/145#issuecomment-300819767>,
    > or mute the thread
    > <https://github.com/notifications/unsubscribe-auth/AAChroDChR08-PSMdZ4oatC0P1N9Brgcks5r4yTGgaJpZM4NXBv9>
    > .
    >
    -- 
    Sent from iPhone



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] bookkeeper issue #145: BOOKKEEPER-1057: Do not log error message after read ...

Posted by eolivelli <gi...@git.apache.org>.
Github user eolivelli commented on the issue:

    https://github.com/apache/bookkeeper/pull/145
  
    @jvrao  I see your point. 
    In order to achieve this goal in my company we use error collectors which gather error streams from the various machines (using Kafka/ElasticSearch and so on). But without "parsing" textual log messages, which can change from version to version, our apps signal errors in a more structured format. 
    We cannot use this method for error generated but third party libs, and we only log exceptions with some kind of "context".



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---