[GNC] Unexpected behaviour of locking mechanis

Adrien Monteleone adrien.monteleone at lusfiber.net
Sat Apr 20 10:52:33 EDT 2019


Good question,

I use SQLite3 also, and there are no .LCK files in my data directory. (they might be placed elsewhere as I’m on MacOS)

But I’ve never had an issue opening other files than my current one.

The only thing I noticed was that you mentioned you cleanly exited before opening one of the older files. Did you cleanly exit when that older file was originally current? If not, then that would be why the lock is still active for it. (however the lock is implemented)

Regards,
Adrien

> On Apr 20, 2019, at 7:58 AM, mc <mc8 at privmgt.com> wrote:
> 
> Config:
> gnucash 3.5 clean install.
> (X)ubuntu Linux 18.04
> gnucash files saved as sqlite.
> 
> Am new to gnucash and testing it.
> 
> I keep several versions of a gnucash file,
> saved with names like <file>-<date>-<id>.gnucash
> 
> After cleanly exiting gnucash by a normal Quit,,
> I may try to open an earlier saved version.
> I frequently get the message:
> 
> GnuCash could not obtain a lock for .../<filename>.gnucash
> the database may be in use by another user, in which case you should not open the database.
> What would you like to do?
> open read only / create new file / open anyway / quit
> 
> I have checked that gnucash is not running,
> and there is no lock file to be found.
> I open it anyway, and it is without problems,
> other than my tabs have disappeared and there is only the default "Accounts" tab.
> 
> In fact there is no .LCK file even when gnucash has a file opened.
> 
> So:
> a.  has gnucash changed the locking mechanism in v3
> or do sqlite files not use a locking mechanism?
> 
> b.  is there a possible issue with this locking mechanism?
> 
> thanks
> mc



More information about the gnucash-user mailing list