Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 52140 invoked from network); 27 Aug 2009 10:01:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Aug 2009 10:01:21 -0000 Received: (qmail 70949 invoked by uid 500); 27 Aug 2009 10:01:21 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 70877 invoked by uid 500); 27 Aug 2009 10:01:21 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 70864 invoked by uid 99); 27 Aug 2009 10:01:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2009 10:01:21 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2009 10:01:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5B71D234C044 for ; Thu, 27 Aug 2009 03:00:59 -0700 (PDT) Message-ID: <1647614965.1251367259364.JavaMail.jira@brutus> Date: Thu, 27 Aug 2009 03:00:59 -0700 (PDT) From: "Robert Newson (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Updated: (COUCHDB-487) Pause write requests to allow compaction to complete In-Reply-To: <620135915.1251363059270.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Newson updated COUCHDB-487: ---------------------------------- Attachment: (was: 0001-block-writes-at-completion-of-compaction-to-allow-sw.patch) > Pause write requests to allow compaction to complete > ---------------------------------------------------- > > Key: COUCHDB-487 > URL: https://issues.apache.org/jira/browse/COUCHDB-487 > Project: CouchDB > Issue Type: Improvement > Components: Database Core > Reporter: Robert Newson > Attachments: block_writes_after_end_of_compaction.patch > > > Continuous writes will currently indefinitely prevent the compaction process from flipping over to the .compact file. > Here's a small patch that adds a new db flag called 'write_available' which becomes false the first time compaction completes but fails to flip over because of concurrent writes. Subsequent calls to update_docs then sleep for 1/2 a second and throw retry. > I ran 'ab -p json -n 1000000 http://localhost:5984/db1' in one window. Without this patch, I get a long sequence of; > [info] [<0.64.0>] Compaction file still behind main file (update seq=1848. compact update seq=1845). Retrying. > and compaction never completes. > With the patch, I get this; > [info] [<0.369.0>] 127.0.0.1 - - 'POST' /db1 201 > [info] [<0.65.0>] Compaction file still behind main file (update seq=2140. compact update seq=2092). Retrying. > [info] [<0.65.0>] Blocking writes to complete compaction. > [info] [<0.65.0>] Compaction for db "db1" completed. > [info] [<0.370.0>] 127.0.0.1 - - 'POST' /db1 201 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.