Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-5532

Don't heap-allocate compressor objects in RowBatch

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Impala 2.10.0
    • Fix Version/s: Impala 2.10.0
    • Component/s: Backend
    • Labels:
      None
    • Epic Color:
      ghx-label-4

      Description

      Every call to RowBatch::RowBatch(..., const TRowBatch&, ...) or RowBatch::Serialize() creates a (de)compressor object. That uses the Codec::CreateCompressor() interface which returns a pointer to a Codec object, so that the virtual compression interface can be used.

      However, we always use LZ4 compression, and so needlessly heap-allocate the compressor objects to get the advantage of implementation hiding which we don't actually need. We should just declare a stack-allocated LZ4 (de)compressor when needed.

        Attachments

          Activity

            People

            • Assignee:
              henryr Henry Robinson
              Reporter:
              henryr Henry Robinson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: