Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-168

LogBuffer.h/LogObject.h overload operator new and do object initialization there using iObject which is evil

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 3.1.1
    • Logging
    • None

    Description

      In header LogBuffer.h the classes iObject/iObjectActivator/iLogBufferData
      need to be cleaned up.

      This code is terribly designed. Nobody should ever do object initialization
      in an overloaded new operator. This caused TS-159.

      The logging code was designed to be completely lockless on the critical path
      and not to do any malloc/new (which typically involve locks) and this code
      breaks that design.

      Basically, this should be rewritten, perhaps someone for Y! could attach
      the patch which added this junk so it can be backed out and whatever
      real functionality it added, added in a reasonable way.

      Attachments

        1. LogBuff.diff
          46 kB
          Leif Hedstrom
        2. TS-168-2.patch
          84 kB
          Zhao Yongming

        Activity

          People

            zym Zhao Yongming
            jplevyak John Plevyak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: