Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1C94510DE6 for ; Sun, 22 Feb 2015 09:50:12 +0000 (UTC) Received: (qmail 54617 invoked by uid 500); 22 Feb 2015 09:50:11 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 54577 invoked by uid 500); 22 Feb 2015 09:50:11 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 54567 invoked by uid 99); 22 Feb 2015 09:50:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Feb 2015 09:50:11 +0000 Date: Sun, 22 Feb 2015 09:50:11 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (CAMEL-8387) File consumer fails to acquire lock if readLockTimeout >= readLockCheckInterval 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/CAMEL-8387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen reassigned CAMEL-8387: ---------------------------------- Assignee: Claus Ibsen > File consumer fails to acquire lock if readLockTimeout >= readLockCheckInterval > ------------------------------------------------------------------------------- > > Key: CAMEL-8387 > URL: https://issues.apache.org/jira/browse/CAMEL-8387 > Project: Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 2.14.1 > Reporter: Christoffer Eide > Assignee: Claus Ibsen > Priority: Minor > Fix For: 2.15.0 > > > If the {{readLockCheckInterval}} is greater than or equal to {{readLockTimeout}} when using {{readLock=changed}}, the consumer never picks up any files. > So this URI will triggers the behaviour: > {{file:some-folder?readLock=changed&readLockCheckInterval=1000&readLockTimeout=500}} > The problem is that {{FileChangedExclusiveReadLockStrategy}} only takes {{readLockTimeout}} into account. > 1. {{FileChangedExclusiveReadLockStrategy}} get the last modified and size of the file. > 2. It sleeps for the duration configured in {{readLockCheckInterval}} > 3. Now the timeout configured in {{readLockTimeout}} is exceeded, so {{FileChangedExclusiveReadLockStrategy}} logs "Cannot acquire read lock within.." and returns false -- This message was sent by Atlassian JIRA (v6.3.4#6332)