Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-6990

SiteToSite handlers throw errors when transaction cancelled with no data sent

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Extensions
    • None

    Description

      StandardFlowFileCodec and CompressionInputStream (the decoders used by SiteToSite receivers whether compression is disabled or enabled, respectively) each throw an error if the transaction is cancelled with no data being transmitted.

      For StandardFlowFileCodec, it is expecting to read the number of attributes for the upcoming flow file, but instead will get the string "RC" followed by a 15 (the cancellation response code). Read as an integer this is larger than the max number of attributes a FlowFile can have, so a ProtocolException is thrown.

      For CompressionInputStream, it also expects there to be data incoming, specifically a chunk header for the compressed data. It attempts to read 4 bytes and match them to a sync sequence, which does not match the "RC" + code input, so an IOException is thrown.

      These classes should defensively check for the cancellation sequence before proceeding with decoding the data.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mattyb149 Matt Burgess
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: