delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/05/31/16:19:59

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=TDyCRmg/dpPK27L4qGdtU7UtTpnaJng95FW5MLi/3oK
ffGLFcW5om4qF5KEe5n8rb2jR1wdQNVLBYrkZSBXcy18X0ZSFHwPK9fYNq59E+J8
GcQtcVtyhKINndWKXEGsjkvbzzB1FLdrbjD8A/gQVkkE2QEVqukEU4Xxk1TCRJlI
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=vyUdZtr17y07UJ8ztk/NhfHc8VU=; b=qvo1DqIIzO9po3Kml
GUX/K7p7TFQDoGPG0cLol7AJeybPZmKHkI8F1N3/O6o/L799MeWbQcW3TjHOeg2b
qsUNT+87MtRAkcSesYgRnYdcRNgcpmfM92bUcb4mkuvlTm31Lk11zjpvf3FiytEZ
XZWBtVw7CHXGKqTd6AoFiMrUPg=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.1
Message-ID: <51A905DC.6020109@etr-usa.com>
Date: Fri, 31 May 2013 14:19:40 -0600
From: Warren Young <warren AT etr-usa DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: sqlite3: bug with monotone
References: <51A6B6EB DOT 6050309 AT users DOT sourceforge DOT net> <loom DOT 20130530T122354-144 AT post DOT gmane DOT org> <51A7862F DOT 1070507 AT etr-usa DOT com> <51A7D47E DOT 3050502 AT users DOT sourceforge DOT net> <51A7F547 DOT 6020509 AT etr-usa DOT com> <20130531092228 DOT GB30659 AT calimero DOT vinschen DOT de> <51A900EF DOT 2020606 AT etr-usa DOT com>
In-Reply-To: <51A900EF.2020606@etr-usa.com>

On 5/31/2013 13:58, Warren Young wrote:
>
> The SQLite code prefers POSIX advisory locks, but it can fall back to
> BSD locks if it has to.

Just to clarify, when I say "POSIX locks" I always mean new style 
fcntl() locks.  There are no calls to lockf() in sqlite3.c.

> I'm not sure why it doesn't just
> blindly try the lock.

On reflection, I'm sure it has something to do with maintaining high 
concurrency.  If it knows its near-future DB file write is going to get 
blocked, it can choose to do something else while the existing DB lock 
holders finish.

By contrast, SQLite's flock() based locking is documented as being much 
more brute-force, resulting in much lower concurrency.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019