Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2461

memoryChannel bytesRemaining counting error

    XMLWordPrintableJSON

Details

    Description

      In doRollback function putByteCounter permits are released by bytesRemaining. This is wrong for the below cases:
      In the doCommit function:
      1)
      if(!bytesRemaining.tryAcquire(putByteCounter, keepAlive,
      TimeUnit.SECONDS))

      { throw new ChannelException("Cannot commit transaction. Heap space " + "limit of " + byteCapacity + "reached. Please increase heap space" + " allocated to the channel as the sinks may not be keeping up " + "with the sources"); }

      2)
      if(!queueRemaining.tryAcquire(-remainingChange, keepAlive, TimeUnit.SECONDS))

      { bytesRemaining.release(putByteCounter); throw new ChannelFullException("Space for commit to queue couldn't be acquired." + " Sinks are likely not keeping up with sources, or the buffer size is too tight"); }

      When they throw ChannelException, bytesRemaining should not release any permits.

      Attachments

        1. flume-2461-0.patch
          1 kB
          Wei Yang

        Activity

          People

            Unassigned Unassigned
            wy96f Wei Yang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: