Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9265

kafka.log.Log instances are leaking on log delete

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.4.0, 2.3.2
    • None
    • None

    Description

      KAFKA-8448 fixes problem with similar leak. The Log objects are being held in ScheduledExecutor PeriodicProducerExpirationCheck callback. The fix in KAFKA-8448 was to change the policy of ScheduledExecutor to remove the scheduled task when it gets canceled (by calling setRemoveOnCancelPolicy(true)).

      This works when a log is closed using close() method. But when a log is deleted either when the topic gets deleted or when the rebalancing operation moves the replica away from broker, the delete() operation is invoked. Log.delete() doesn't close the pending scheduled task and that leaks Log instance.

      Fix is to close the scheduled task in the Log.delete() method too.

      Attachments

        Issue Links

          Activity

            People

              vikasconfluent Vikas Singh
              vikasconfluent Vikas Singh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: