the commit rollback thing
Fairlight
fairlite at fairlite.com
Fri Mar 26 05:28:37 PST 2004
This public service announcement was brought to you by John Esak:
>
> Yes, after our FP Room conversation... I see what you were saying. If you
> have a process that posts to 20 other tables... with a commit/rollback RDBMS
> you can just say... roll all this stuff back near or at the end of the
> transaction and it will be done. In filePro this requires "not" posting to
> the other files until you are sure everything is the way you want it and
> then dint the post and "commit" of everything. Yes, this is a big pain in
> the ass and if there were a way not to do it... that would certainly be
> cool. However, like I say, it _is_ possible to emulate this in filePro. Not
> impossible, I do it all the time.
Which point in the discussion brings up a nasty little problem.
Let's assume you are basing your assumptions for posting your data on
information in various databases.
What stops you from getting a bad logic check because someone else updated a
record somewhere after you'd gathered that data, but before you commit?
Unless you hold every relevant record open and locked, someone could change
the very data that you're basing your assumption on, thus rendering your
logic invalid.
Worst case, if it were a total based on something in -every- record over
several thousand records (let's say a total of something in a detail
table), you'd run out of file descriptors long before you could lock every
record. And unless I'm overlooking something really huge, there's no
equivalent of LOCK TABLES to rely on.
So how would you prevent something like that--a false-positive test skewed
by other users during your operations?
One person has told me that it's tacitly impossible, but you've been known
to achieve the impossible before. :) I'm curious if there's a way to
actually avoid this kind of scenario.
mark->
--
Bring the web-enabling power of OneGate to -your- filePro applications today!
Try the live filePro-based, OneGate-enabled demo at the following URL:
http://www2.onnik.com/~fairlite/flfssindex.html
More information about the Filepro-list
mailing list