Kafka
  1. Kafka
  2. KAFKA-819

System Test : Add validation of log segment index to offset

    Details

      Description

      This can be achieved by calling DumpLogSegments.

        Activity

        Hide
        Jun Rao added a comment -

        Thanks for the patch. Committed to 0.8.

        Show
        Jun Rao added a comment - Thanks for the patch. Committed to 0.8.
        Hide
        John Fung added a comment -

        This patch is tested with an older 0.8 branch (before kafka-804 checkin) to reproduce the mismatching index-offset:

        2013-03-27 14:48:33,033 - DEBUG - executing command [ssh localhost /home/kafka/kafka_sanity_20130314_gen_invalid_index/bin/kafka-run-class.sh kafka.tools.DumpLogSegments --file /home/kafka/kafka_sanity_20130314_gen_invalid_index/system_test/replication_testsuite/testcase_0206/logs/broker-1/kafka_server_1_logs/test_1-2/00000000000000000000.index --verify-index-only 2>&1] (kafka_system_test_utils)
        2013-03-27 14:48:34,038 - DEBUG - #### error found [Mismatches in :00000000000000000000.index] (kafka_system_test_utils)
        2013-03-27 14:48:34,039 - DEBUG - #### [ Index offset: 755, log offset: 750] (kafka_system_test_utils)
        2013-03-27 14:48:34,039 - DEBUG - #### [ Index offset: 635, log offset: 630] (kafka_system_test_utils)
        2013-03-27 14:48:34,039 - DEBUG - #### [ Index offset: 515, log offset: 510] (kafka_system_test_utils)
        2013-03-27 14:48:34,039 - DEBUG - #### [ Index offset: 395, log offset: 390] (kafka_system_test_utils)
        2013-03-27 14:48:34,039 - DEBUG - #### [ Index offset: 275, log offset: 270] (kafka_system_test_utils)
        2013-03-27 14:48:34,039 - DEBUG - #### [ Index offset: 125, log offset: 120] (kafka_system_test_utils)

        Show
        John Fung added a comment - This patch is tested with an older 0.8 branch (before kafka-804 checkin) to reproduce the mismatching index-offset: 2013-03-27 14:48:33,033 - DEBUG - executing command [ssh localhost /home/kafka/kafka_sanity_20130314_gen_invalid_index/bin/kafka-run-class.sh kafka.tools.DumpLogSegments --file /home/kafka/kafka_sanity_20130314_gen_invalid_index/system_test/replication_testsuite/testcase_0206/logs/broker-1/kafka_server_1_logs/test_1-2/00000000000000000000.index --verify-index-only 2>&1] (kafka_system_test_utils) 2013-03-27 14:48:34,038 - DEBUG - #### error found [Mismatches in :00000000000000000000.index] (kafka_system_test_utils) 2013-03-27 14:48:34,039 - DEBUG - #### [ Index offset: 755, log offset: 750] (kafka_system_test_utils) 2013-03-27 14:48:34,039 - DEBUG - #### [ Index offset: 635, log offset: 630] (kafka_system_test_utils) 2013-03-27 14:48:34,039 - DEBUG - #### [ Index offset: 515, log offset: 510] (kafka_system_test_utils) 2013-03-27 14:48:34,039 - DEBUG - #### [ Index offset: 395, log offset: 390] (kafka_system_test_utils) 2013-03-27 14:48:34,039 - DEBUG - #### [ Index offset: 275, log offset: 270] (kafka_system_test_utils) 2013-03-27 14:48:34,039 - DEBUG - #### [ Index offset: 125, log offset: 120] (kafka_system_test_utils)
        Hide
        John Fung added a comment -

        Uploaded kafka-819-v1.patch

        Show
        John Fung added a comment - Uploaded kafka-819-v1.patch

          People

          • Assignee:
            John Fung
            Reporter:
            John Fung
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development