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 B6F22200B49 for ; Wed, 3 Aug 2016 11:19:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B571F160A86; Wed, 3 Aug 2016 09:19:22 +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 309E1160A64 for ; Wed, 3 Aug 2016 11:19:22 +0200 (CEST) Received: (qmail 99611 invoked by uid 500); 3 Aug 2016 09:19:20 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 99445 invoked by uid 99); 3 Aug 2016 09:19:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Aug 2016 09:19:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 77A352C0D5D for ; Wed, 3 Aug 2016 09:19:20 +0000 (UTC) Date: Wed, 3 Aug 2016 09:19:20 +0000 (UTC) From: "Vladimir Ozerov (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (IGNITE-3513) Cleanup worker is placed in the Thread's waiting queue using Thread.sleep method MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 03 Aug 2016 09:19:22 -0000 [ https://issues.apache.org/jira/browse/IGNITE-3513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vladimir Ozerov closed IGNITE-3513. ----------------------------------- > Cleanup worker is placed in the Thread's waiting queue using Thread.sleep method > -------------------------------------------------------------------------------- > > Key: IGNITE-3513 > URL: https://issues.apache.org/jira/browse/IGNITE-3513 > Project: Ignite > Issue Type: Bug > Affects Versions: 1.6 > Reporter: Denis Magda > Assignee: Semen Boikov > Fix For: 1.7 > > > There is a bug in current implementation of {{GridCacheTtlManager#CleanupWorker}}. > Refer to the implementation's code snippet and the details below. > {code} > EntryWrapper first = pendingEntries.firstx(); > if (first != null) { > long waitTime = first.expireTime - U.currentTimeMillis(); > if (waitTime > 0) > U.sleep(waitTime); > } > {code} > 1. Put first item with TTL = 1 hour. CleanupWorker will go to sleep for 1 hour. > 2. Put second item with TTL = 1 minute. Since > CleanupWorker's thread sleeps now, second item will not be expired at the time. > NOTE: This scenario is easily to reproducible if first and second items are put into cache asynchronously. If try to put them in same thread one-by-one expiration may work fine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)