log files don't log account creation?

Benoit Grégoire bock at step.polymtl.ca
Wed Aug 11 00:28:40 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 10 August 2004 09:48 pm, cosmodog at comcast.net wrote:
> On Aug 10, 2004, at 4:52 PM, Derek Atkins wrote:
> > jdebert <jdebert at garlic.com> writes:
> >> cosmodog at comcast.net wrote:
> >>> I recently had need to recover some "unsaved" work by "replaying" a
> >>> log file.
> >>
> >> more or less what I had reported to the list earlier.
> >>
> >> Was apparently ignored as i got jumped on instead with the assumption
> >> that i lacked a backup policy and failed to do backups.
> >>
> >> You might also get "criticised" for "failing to properly backup".
> >
> > "save early, save often"...
>
> Add to that  "don't even think about using the log replay feature."
>
> On closer examination my log replay was a miserable failure.  I only
> needed to recover a little bit of work since I do save early and often.
>   But it seems that log reply doesn't just start after your last "save",
> it runs through everything you have done _since you last started GC_.

Apparently you selected the wrong log file.

> If my data is written out as _text_  and reloaded when I restart GC,
> and it  _displays_ in the register just fine, how can it still be in
> such a whacked uneditable state?

There is way more data attached to each transaction than what you see in the 
register.

> The replay feature should be removed as dangerous.  At least the Help
> system should not so cheerfully imply it is useful.  I'm just pissed.
> I'll get over it.

I didn't write the help.  As for the replay, the loging feature has been there 
since the 1.6 series, but there hasn't been a compatible player for years.  
After hearing whining on the mailing list for months, I decided to write a 
player for whatlittle was actually logged, namely the transactions 
themselves.  I announced it was in CVS and it needed testing about a months 
before a stable release.

Testing you say?  It turned out that I missed a file during the commit, 
meaning it there is no way it could work for anyone.  Well, guess what?  Not 
only did no one notice before release, but no one notice for the entire 
subsequent release cycle (or almost).  This means that no one, of all the 
gnucash users could be bothered to test the player for 6 months.

Guess what?  I fixed the bad commit and some other bug the person who finally 
found out the bad commit also reported, and left the importer in its half 
assed state, since clearly no one cared and the main reason I actually did it 
was to stop all the complaining.
  
> Does anyone find that log replay works?  Anyone rely on it?  Is it just
> incompatible with transactions created via SX and business features?

Account creation isn't logged, nor is the metadata for SX and business 
features.   That means that replaying a log containing any such transactions 
will cause problems.

>I am still interested in understanding where is GC hiding the mystery 
>transfer account.

Good question, most likely it's silently accepting a transaction with an 
invalid account pointer.  The engine should not normally accept such 
transactions.  This is the offending code in the player:

		      if(record.acc_guid_present)
			{
			  acct = xaccAccountLookupDirect(record.acc_guid,book);
			  xaccAccountInsertSplit(acct,split);
			}

Now obvioulsy it would be better to check the return of   
xaccAccountLookupDirect, but it doubt a simple check for null will suffice.  
Too tired to look it up.  Patches accepted.

Good night,
- -- 
Benoit Grégoire, http://benoitg.coeus.ca/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBGaB5mZ6zzPlLuwMRAsm1AJoDWuwX1plT+L+0O9llmpMqjtztsgCg4JVb
i+R/A4Vb4ZFuio1kgw53Ii4=
=xjTa
-----END PGP SIGNATURE-----



More information about the gnucash-user mailing list