🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.opensource
Article #200

Re: Disaperaed data

#200
From: Magnus Flysj�
Date: Wed, 16 Nov 2005 16:04
70 lines
3294 bytes
"Bill Todd" <no@no.com> skrev i meddelandet 
news:437b43c6$1@newsgroups.borland.com...
> Magnus Flysjv wrote:
>
>> I have the same problem.
>> But this is on a 6.0.2.0 version.
>>
>> We have an application that never commited as often as it should.
>> When the application is close and commit was called, we lost all data
>> and I have no idea why.
>
> Did you run gfix on the database to see if it has become corrupt?
>

Yes, gfix and gbak.. and it was only some page errors..
The GDB file was never corrupted so that it couldn't be opened in Interbase.

> Are you sure you committed all active transactions before the
> application was closed? If you close the program with a transaction
> active it will be rolled back, not committed.
>

The code below is from the Delphi sourcecode for the application, upon 
destruction of the class that handles all the database actions
...
 FStoredProc.Free;
 FSQL.Free;
 FQuery.Free;
 if FTransaction.Active then begin
  FTransAction.Commit;
  FTransAction.Active := false;
 end;
 FDatabase.Close;
 FTransaction.free;
 FDatabase.free;
...

>>
>> Also, the GDB file grown very fast.. but if I use gbak and gfix, the
>> file is shrinken from 32MB to only 2MB.
>
> Long running transactions disable garbage collection. This allows
> garbage record versions to accumulate in the database if you hare doing
> a lot of updates or deletes which, in turn, will cause the database
> file to grow.

There is at least one update per minute.. and this has been going on for 6 
months without any commit at all..
(I know this is stupid, but it was a bug in the application that caused the 
commit not to fire when it should)

>
>>
>> Can anyone smart confirm if there will be a problem if data isn't
>> commited often?
>
> There can be problems, depending on your transaction volume and whether
> you are performing a a lot of updates and deletes or not but this will
> not cause data to disappear.

Well, all data was lost.. and there was lots of updated data into several 
tables for a 6 months period.
When the application was terminated and the code (see above) was called, the 
data was never commited correct and all the data was lost.

>
> -- 
> Bill Todd (TeamB)
> 
Technical Details
Message-ID: <437b587e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <42a975c4$1@newsgroups.borland.com> <437b2c01@newsgroups.borland.com> <437b43c6$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 106772,2b7ab1a9c8c0694
X-Google-Attributes: gid106772,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Magnus Flysj�" <magnus@flysjo.com>
From: "Magnus Flysj�" <magnus@flysjo.com>
Newsgroups: borland.public.interbase.opensource
References: <42a975c4$1@newsgroups.borland.com> <437b2c01@newsgroups.borland.com> <437b43c6$1@newsgroups.borland.com>
Subject: Re: Disaperaed data
Date: Wed, 16 Nov 2005 17:04:57 +0100
Lines: 72
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 213.112.41.159
Message-ID: <437b587e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1132157054 213.112.41.159 (16 Nov 2005 08:04:14 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail