Return-Path: X-Original-To: apmail-incubator-kafka-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-kafka-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB8CDDFB5 for ; Tue, 6 Nov 2012 00:10:13 +0000 (UTC) Received: (qmail 58884 invoked by uid 500); 6 Nov 2012 00:10:13 -0000 Delivered-To: apmail-incubator-kafka-dev-archive@incubator.apache.org Received: (qmail 58857 invoked by uid 500); 6 Nov 2012 00:10:13 -0000 Mailing-List: contact kafka-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: kafka-dev@incubator.apache.org Delivered-To: mailing list kafka-dev@incubator.apache.org Received: (qmail 58847 invoked by uid 99); 6 Nov 2012 00:10:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2012 00:10:13 +0000 Date: Tue, 6 Nov 2012 00:10:13 +0000 (UTC) From: "Yang Ye (JIRA)" To: kafka-dev@incubator.apache.org Message-ID: <1570725034.71442.1352160613577.JavaMail.jiratomcat@arcas> In-Reply-To: <185495505.42011.1351555693803.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (KAFKA-593) Empty log index file created when it shouldn't be empty MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yang Ye updated KAFKA-593: -------------------------- Attachment: kafka_593_v5.diff Thanks for the comments, changes in v5: 1. rename resetSize() to resize() 2. add using roundToMultiple() in resize() 3. add comments to resize() 4. add one unit test "testIndexResizingAtTruncation" in LogTest for this case > Empty log index file created when it shouldn't be empty > ------------------------------------------------------- > > Key: KAFKA-593 > URL: https://issues.apache.org/jira/browse/KAFKA-593 > Project: Kafka > Issue Type: Bug > Reporter: Yang Ye > Attachments: kafka_583_zk_kafka_data.tar.gz, kafka_593_v1.diff, kafka_593_v2.diff, kafka_593_v3.diff, kafka_593_v4.diff, kafka_593_v5.diff > > > We have met empty index file during system test when it shouldn't be empty. In this case, there're around 100 messages in each segment, each of size around 100 bytes, given the "logIndexIntervalBytes" 4096, there should be at least 2 log index entries, but we see empty index file. The kafka and zookeeper logs are attached > [yye@yye-ld kafka_server_3_logs]$ cd test_1-2/ > [yye@yye-ld test_1-2]$ ls -l > total 84 > -rw-r--r-- 1 yye eng 8 Oct 29 15:22 00000000000000000000.index > -rw-r--r-- 1 yye eng 10248 Oct 29 15:22 00000000000000000000.log > -rw-r--r-- 1 yye eng 8 Oct 29 15:22 00000000000000000100.index > -rw-r--r-- 1 yye eng 10296 Oct 29 15:22 00000000000000000100.log > -rw-r--r-- 1 yye eng 0 Oct 29 15:23 00000000000000000200.index > -rw-r--r-- 1 yye eng 10293 Oct 29 15:23 00000000000000000200.log > -rw-r--r-- 1 yye eng 0 Oct 29 15:23 00000000000000000300.index > -rw-r--r-- 1 yye eng 10274 Oct 29 15:23 00000000000000000300.log > -rw-r--r-- 1 yye eng 0 Oct 29 15:23 00000000000000000399.index > -rw-r--r-- 1 yye eng 10276 Oct 29 15:23 00000000000000000399.log > -rw-r--r-- 1 yye eng 0 Oct 29 15:23 00000000000000000498.index > -rw-r--r-- 1 yye eng 10256 Oct 29 15:23 00000000000000000498.log > -rw-r--r-- 1 yye eng 10485760 Oct 29 15:23 00000000000000000596.index > -rw-r--r-- 1 yye eng 3564 Oct 29 15:23 00000000000000000596.log -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira