Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15766

NoSpamLogger arguments building objects on hot paths

    XMLWordPrintableJSON

    Details

    • Bug Category:
      Degradation - Performance Bug/Regression
    • Severity:
      Normal
    • Complexity:
      Normal
    • Discovered By:
      Adhoc Test
    • Platform:
      All
    • Impacts:
      None
    • Since Version:
    • Test and Documentation Plan:
      Hide

      Just passing utests and dtests, assuming reviewed performance improvements are non-controversial. Shouldn't be any impact on documentation.

      Show
      Just passing utests and dtests, assuming reviewed performance improvements are non-controversial. Shouldn't be any impact on documentation.

      Description

      NoSpamLogger is used in hot logging paths to prevent logs being overrun.  For that to be most effective the arguments to the logger need to be cheap to construct.  During the internode messaging refactor CASSANDRA-15066, performance changes to BufferPool for CASSANDRA-14416
      were accidentally reverted in the merge up from 3.11.

      Reviewing other uses since, it looks like there are a few places where the arguments require some form of String building.

      org.apache.cassandra.net.InboundSink#accept
      org.apache.cassandra.net.InboundMessageHandler#processCorruptFrame
      org.apache.cassandra.net.InboundMessageHandler.LargeMessage#deserialize
      org.apache.cassandra.net.OutboundConnection#onOverloaded
      org.apache.cassandra.utils.memory.BufferPool.GlobalPool#allocateMoreChunks

      Formatting arguments should either be precomputed, or if expensive they should be computed after the decision on whether to noSpamLog has been made.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                maedhroz Caleb Rackliffe
                Reporter:
                jmeredithco Jon Meredith
                Authors:
                Caleb Rackliffe
                Reviewers:
                Aleksey Yeschenko, Zhao Yang
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m