Re: [WebDNA] exclusive lock prevents dbs from closing

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 107404
interpreted = N
texte = Kenneth Grome wrote: > I asked about this a month or two ago but no one answered, > and now I discovered the answer myself ... Well, I answered... I said "run some tests".. which it looks like you did. I'm assuming [flushdatabases] doesn't work either. > [exclusivelock] prevents the designated dbs (the ones named > in the exclusivelock context) from being closed or flushed by > webdna tags appearing inside the context. > > In other words, you cannot obtain an exclusivelock on a db > and then close it in order purge it from RAM so that you can > replace the db file on disk with a new one before a visitor > requests that db ... > > ... because even though the db file on disk gets replaced, > the original data which is still in RAM ends up overwriting > the data on disk. > > Sincerely, > Kenneth Grome You could put: [closedatabase db=db_file.db&commit=F] just before the exclusivelock.. or, if you are paranoid about the db being accessed before the exclusivelock is set, make the database name dynamic and create a new database to use within the exclusivelock?? I guess I don't know what you are doing exactly, but I've used dynamic database names in the past. Donovan -- Donovan Brooke Euca Design Center www.euca.us www.keepitturning.co Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] exclusive lock prevents dbs from closing (Donovan Brooke 2011)
  2. [WebDNA] exclusive lock prevents dbs from closing (Kenneth Grome 2011)
Kenneth Grome wrote: > I asked about this a month or two ago but no one answered, > and now I discovered the answer myself ... Well, I answered... I said "run some tests".. which it looks like you did. I'm assuming [flushdatabases] doesn't work either. > [exclusivelock] prevents the designated dbs (the ones named > in the exclusivelock context) from being closed or flushed by > webdna tags appearing inside the context. > > In other words, you cannot obtain an exclusivelock on a db > and then close it in order purge it from RAM so that you can > replace the db file on disk with a new one before a visitor > requests that db ... > > ... because even though the db file on disk gets replaced, > the original data which is still in RAM ends up overwriting > the data on disk. > > Sincerely, > Kenneth Grome You could put: [closedatabase db=db_file.db&commit=F] just before the exclusivelock.. or, if you are paranoid about the db being accessed before the exclusivelock is set, make the database name dynamic and create a new database to use within the exclusivelock?? I guess I don't know what you are doing exactly, but I've used dynamic database names in the past. Donovan -- Donovan Brooke Euca Design Center www.euca.us www.keepitturning.co Donovan Brooke

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Emailer setup (1997) More on the email templates (1997) How do I pass [cart] when user clicks back (2000) [WebDNA] Dynamic vertical columns (2008) Another question (1997) Reloading Shopping Carts (1998) WebCat2b12 - nesting [tags] (1997) Cancel Subscription (1996) [WebDNA] Mac OS Intel version? (2008) Faxing orders in place of email (1997) Deleting Orders (1997) Why don't my carts expire (1998) problems with WebCat-Plugin (1997) Date Formats (1997) PCS Customer submissions ? (1997) Attention all list readers (1997) Math with Time (1997) [cart] (1998) Tab Charactor (1997) SiteGuard Admin Feature ? (1997)