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

Implement transaction manager module

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Abandoned
    • None
    • None
    • None

    Description

      • Entry point for transaction requests
      • Appends transaction control records to the transaction journal
      • Sends transaction control records to data brokers
      • Responsible for expiring transactions
      • Supports fail-over: for which it needs to maintain a transaction HW which is the offset of the BEGIN control record of the earliest pending transaction. It should checkpoint the HW periodically either to ZK/separate topic/offset commit.

      We merge KAFKA-1565 transaction manager failover handling into this JIRA. Transaction manager should guarantee that, once a pre-commit/pre-abort request is acknowledged, commit/abort request will be delivered to partitions involved in the transaction.

      This patch handles the following failover scenarios:
      1) Transaction manager or its followers fail before txRequest is duplicated on local log and followers.
      Solution: Transaction manager responds to request with error status. The producer keeps trying to commit.
      2) The txPartition’s leader is not available.
      Solution: Put txRequest on unSentTxRequestQueue. When metadataCache is updated, check and re-send txRequest from unSentTxRequestQueue if possible.
      3) The txPartition’s leader fails when txRequest is in channel manager.
      Solution: Retrieve all txRequests queued for transmission to this broker and put them on unSentTxRequestQueue.
      4) Transaction manage does not receive success response from txPartition’s leaders within timeout period.
      Solution: Transaction manager expires the txRequest and re-send it.
      5) Transaction manager fails.
      Solution: The new transaction manager reads transactionHW from zookeeper, and sends txRequest starting from the transactionHW.

      This patch does not provide the following feature. These will be provided in separate patches.
      1) Producer offset commit.
      2) Transaction expiration.

      Attachments

        1. KAFKA-1523_2014-07-17_20:12:55.patch
          40 kB
          Dong Lin
        2. KAFKA-1523_2014-07-22_16:45:42.patch
          43 kB
          Dong Lin
        3. KAFKA-1523_2014-08-05_21:25:55.patch
          63 kB
          Dong Lin
        4. KAFKA-1523_2014-08-08_21:36:52.patch
          66 kB
          Dong Lin

        Activity

          People

            lindong Dong Lin
            jjkoshy Joel Jacob Koshy
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: