From jira-return-10529-archive-asf-public=cust-asf.ponee.io@kafka.apache.org Thu Mar 8 05:54:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id D5A96180656 for ; Thu, 8 Mar 2018 05:54:05 +0100 (CET) Received: (qmail 70315 invoked by uid 500); 8 Mar 2018 04:54:04 -0000 Mailing-List: contact jira-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@kafka.apache.org Delivered-To: mailing list jira@kafka.apache.org Received: (qmail 70302 invoked by uid 99); 8 Mar 2018 04:54:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2018 04:54:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A92331802E6 for ; Thu, 8 Mar 2018 04:54:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id YvJ3d_5H5oUB for ; Thu, 8 Mar 2018 04:54:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 77F0F5FAC2 for ; Thu, 8 Mar 2018 04:54:01 +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 A2214E0291 for ; Thu, 8 Mar 2018 04:54:00 +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 5DE5925402 for ; Thu, 8 Mar 2018 04:54:00 +0000 (UTC) Date: Thu, 8 Mar 2018 04:54:00 +0000 (UTC) From: "Dong Lin (JIRA)" To: jira@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-6624) log segment deletion could cause a disk to be marked offline incorrectly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-6624?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1639= 0753#comment-16390753 ]=20 Dong Lin commented on KAFKA-6624: --------------------------------- [~junrao] It may be reasonable to grab the lock of the log during log.flush= (). This will be consistent with the idea that all write/read operation of = log segments will be synchronized using the per-log lock. It will incur slightly higher overhead but personally I think it is OK. We = will only flush the log segments since the previous flushed offset (i.e. re= covery offset). Alternatively we can use the flag to optimize it. Not sure = if the performance improvement with that optimization is worth the extra co= mplexity. Can you review [https://github.com/apache/kafka/pull/4663/files?|https://gi= thub.com/apache/kafka/pull/4663/files] =C2=A0 > log segment deletion could cause a disk to be marked offline incorrectly > ------------------------------------------------------------------------ > > Key: KAFKA-6624 > URL: https://issues.apache.org/jira/browse/KAFKA-6624 > Project: Kafka > Issue Type: Bug > Components: core > Affects Versions: 1.1.0 > Reporter: Jun Rao > Priority: Major > > Saw the following log. > [2018-03-06 23:12:20,721] ERROR Error while flushing log for topic1-0 in = dir /data01/kafka-logs with offset 80993 (kafka.server.LogDirFailureChannel= ) > java.nio.channels.ClosedChannelException > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at sun.nio.ch.FileChannelImpl.ensureOpen(File= ChannelImpl.java:110) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at sun.nio.ch.FileChannelImpl.force(FileChann= elImpl.java:379) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.kafka.common.record.FileRecords= .flush(FileRecords.java:163) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.log.LogSegment$$anonfun$flush$1.appl= y$mcV$sp(LogSegment.scala:375) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.log.LogSegment$$anonfun$flush$1.appl= y(LogSegment.scala:374) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.log.LogSegment$$anonfun$flush$1.appl= y(LogSegment.scala:374) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.metrics.KafkaTimer.time(KafkaTimer.s= cala:31) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.log.LogSegment.flush(LogSegment.scal= a:374) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.log.Log$$anonfun$flush$1$$anonfun$ap= ply$mcV$sp$4.apply(Log.scala:1374) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.log.Log$$anonfun$flush$1$$anonfun$ap= ply$mcV$sp$4.apply(Log.scala:1373) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at scala.collection.Iterator$class.foreach(It= erator.scala:891) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at scala.collection.AbstractIterator.foreach(= Iterator.scala:1334) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at scala.collection.IterableLike$class.foreac= h(IterableLike.scala:72) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at scala.collection.AbstractIterable.foreach(= Iterable.scala:54) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.log.Log$$anonfun$flush$1.apply$mcV$s= p(Log.scala:1373) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.log.Log$$anonfun$flush$1.apply(Log.s= cala:1368) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.log.Log$$anonfun$flush$1.apply(Log.s= cala:1368) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.log.Log.maybeHandleIOException(Log.s= cala:1669) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.log.Log.flush(Log.scala:1368) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.log.Log$$anonfun$roll$2$$anonfun$app= ly$1.apply$mcV$sp(Log.scala:1343) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.utils.KafkaScheduler$$anonfun$1.appl= y$mcV$sp(KafkaScheduler.scala:110) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at kafka.utils.CoreUtils$$anon$1.run(CoreUtil= s.scala:61) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.util.concurrent.Executors$RunnableAda= pter.call(Executors.java:511) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.util.concurrent.FutureTask.run(Future= Task.java:266) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.util.concurrent.ScheduledThreadPoolEx= ecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.util.concurrent.ScheduledThreadPoolEx= ecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.util.concurrent.ThreadPoolExecutor.ru= nWorker(ThreadPoolExecutor.java:1149) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.util.concurrent.ThreadPoolExecutor$Wo= rker.run(ThreadPoolExecutor.java:624) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.lang.Thread.run(Thread.java:748) > [2018-03-06 23:12:20,722] INFO [ReplicaManager broker=3D0] Stopping servi= ng replicas in dir /data01/kafka-logs (kafka.server.ReplicaManager) > It seems that topic1 was being deleted around the time when flushing was = called. Then flushing hit an IOException, which caused the disk to be marke= d offline incorrectly. -- This message was sent by Atlassian JIRA (v7.6.3#76005)