Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 24FE0200C80 for ; Thu, 25 May 2017 15:54:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 23CFC160BCA; Thu, 25 May 2017 13:54:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 72001160BC7 for ; Thu, 25 May 2017 15:54:07 +0200 (CEST) Received: (qmail 26314 invoked by uid 500); 25 May 2017 13:54:06 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 26303 invoked by uid 99); 25 May 2017 13:54:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 May 2017 13:54:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 1EF34C0096 for ; Thu, 25 May 2017 13:54:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id mZ1Lu18viXUD for ; Thu, 25 May 2017 13:54:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 241E35FC4D for ; Thu, 25 May 2017 13:54:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 925DAE0373 for ; Thu, 25 May 2017 13:54:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0B1C721B56 for ; Thu, 25 May 2017 13:54:04 +0000 (UTC) Date: Thu, 25 May 2017 13:54:04 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-5326) Log offset index resize cause empty index file MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 25 May 2017 13:54:08 -0000 [ https://issues.apache.org/jira/browse/KAFKA-5326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16024752#comment-16024752 ] ASF GitHub Bot commented on KAFKA-5326: --------------------------------------- Github user ZanderXu closed the pull request at: https://github.com/apache/kafka/pull/3143 > Log offset index resize cause empty index file > ------------------------------------------------ > > Key: KAFKA-5326 > URL: https://issues.apache.org/jira/browse/KAFKA-5326 > Project: Kafka > Issue Type: Bug > Components: core, log > Affects Versions: 0.10.2.1 > Reporter: Ma Tianchi > > After a log index file lost or be removed when kafka server is running,then some one calls OffsetIndex.resize(newSize: Int) .It will cause a new index file be created but there is no values in it,even though the size is same with old one. > It will do something as below. > val raf = new RandomAccessFile(file, "rw") > This time file does not exit.It will create a new file. > Then at: > mmap = raf.getChannel().map(FileChannel.MapMode.READ_WRITE, 0, roundedNewSize) > The mmap is created from new file which is empty. > and then: > mmap.position(position) > This make the new index file which size is same with old index file,but there is nothing in it. -- This message was sent by Atlassian JIRA (v6.3.15#6346)