Details

      Description

      com.bigdata.relation.accesspath.BlockingBuffer logs and then throws exception. This results in exceptions get logged two times
      - one in BlockingBuffer and one more time in my application. It's very confusing to read such logs and makes debugging harder than necessary.
      This is a known antipattern
      - please look at the link below:
      https://today.java.net/article/2006/04/04/exception-handling-antipatterns#logAndThrow

        Activity

        Hide
        ash2k ash2k added a comment -

        One more place that does this is PipelineJoin class. Please, remove these log statements.

        Show
        ash2k ash2k added a comment - One more place that does this is PipelineJoin class. Please, remove these log statements.
        Hide
        bryanthompson bryanthompson added a comment -

        Please add the specific line numbers to the ticket.

        We sometimes do this to ensure that the exceptions are not swallowed by another layer in bigdata or in the application. If we rely only on the application, then we find that people sometimes drop exceptions and then we are unable to see the exception at all in the logs.

        Show
        bryanthompson bryanthompson added a comment - Please add the specific line numbers to the ticket. We sometimes do this to ensure that the exceptions are not swallowed by another layer in bigdata or in the application. If we rely only on the application, then we find that people sometimes drop exceptions and then we are unable to see the exception at all in the logs.
        Hide
        ash2k ash2k added a comment -

        BlockingBuffer line 1484 and PipelineJoin line 930. Also I see that PipelineJoin line 927 uses halt() which will log too.

        I totally understand your point about users dropping exceptions but this is a problem in their code and they should not do it. If they log to /dev/null then you will not see those logs too no matter what you do That doesn't mean you should log to separate file yourself. I'm just trying to say that it's up to the user to correctly use embedded library.

        Thank you.

        Show
        ash2k ash2k added a comment - BlockingBuffer line 1484 and PipelineJoin line 930. Also I see that PipelineJoin line 927 uses halt() which will log too. I totally understand your point about users dropping exceptions but this is a problem in their code and they should not do it. If they log to /dev/null then you will not see those logs too no matter what you do That doesn't mean you should log to separate file yourself. I'm just trying to say that it's up to the user to correctly use embedded library. Thank you.
        Hide
        bryanthompson bryanthompson added a comment -

        In order to support the product, we need to have reliable reporting of critical errors. This sometimes involves a log and thrown pattern. This is a design decision. We may change specific instances of this pattern depending on a case by case basis, but the project will continue to use this pattern when necessary to ensure adequate error reporting for diagnostic purposes.

        Show
        bryanthompson bryanthompson added a comment - In order to support the product, we need to have reliable reporting of critical errors. This sometimes involves a log and thrown pattern. This is a design decision. We may change specific instances of this pattern depending on a case by case basis, but the project will continue to use this pattern when necessary to ensure adequate error reporting for diagnostic purposes.

          People

          • Assignee:
            mikepersonick mikepersonick
            Reporter:
            ash2k ash2k
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: