Re: Strange behaviour of addref called from shell script

Jeremy Malcolm <[email protected]> Sat, 12 May 2007 21:13:29 +0800
Newsgroups gmane.text.refdb.general
Message-ID <[email protected]>
Markus Hoenicka wrote:
> There is indeed nothing unusual here. In fact, I use a (far from
> perfect) test harness here which is a shell script like yours. It
> creates databases, inserts, updates, picks, unpicks, deletes
> references and notes. I have never seen any difference between running
> a command from the command line or from within a script.

Suddenly, it just started doing the same thing from the command line. 
Then I exited from a few applications and tried again and it worked.  So 
I guess the problem wasn't really caused by running refdbc from a 
script, it was just that the extra overhead of another shell instance 
created a lack of system resources.

In any case, when it fails, addref produces this output:

233:1
414:1
233:2
414:2
233:3
414:3
233:4
414:4
233:5
414:5 ...

Whereas when it succeeds it produces output like this (showing my 
citation keys):

406:1:RFC3492
408:1
406:2:GAC2006GAC-PRINCIPLES-
408:2
406:3:SMITH2001TAKING-DELIBERA
408:3
406:4:NYGH1995CONFLICT-OF-LAW
408:4
406:5:MUELLER2006A-FUNNY-THING-H
408:5
406:6:MUELLER2005WHAT-TO-DO-ABOU ...

> The only way to bump into this problem is to cause refdbd to stop
> inserting data before it updates the citation key of a newly created
> dataset. This would create an incomplete dataset with that particular
> dummy citation key. This problem also requires lack of transaction
> support, as otherwise the rollback (or the missing commit in case of a
> crash) would cause MySQL to remove the dataset again. I don't see how
> running refdbc from a script could cause this problem, but it seems to
> be a fact. Could you please do the following:
> 
> - check the MySQL log for additional hints
> - create a SQL dump of your thesis database after your script ran
>   unsuccessfully. Please include the refdbd log of that particular run
>   as I'd like to compare the process IDs involved.

Sending MySQL log, database dump and refdbd log privately.

-- 
Jeremy Malcolm LLB (Hons) B Com
Internet and Open Source lawyer, IT consultant, actor
host -t NAPTR 1.0.8.0.3.1.2.9.8.1.6.e164.org|awk -F! '{print $3}'

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/