--
You received this message because you are subscribed Cyclopath Development.
To post to this group: send email to cyclop...@googlegroups.com
To read this group on the Web: http://groups.google.com/group/cyclopath-dev
To unsubscribe from this group: send email to
cyclopath-de...@googlegroups.com
To unsubscribe from this group, send email to cyclopath-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
I would love to solve this problem!
Is this easily reproducible?
Are there certain steps we can perform to recreate this problem?
To be honest, I've seen the code for these dialogs, but I've never seen the problem myself. That said, I'm almost always testing against my own box and not the production server (i.e., against http://magic.cyclopath.org).
I guess I'm asking two things, really -- (1) is this easily reproducible,
and (2) does this happen a lot?
>>> -Try a partial save. Any individual edits that can't be integrated into
>>> the map database will be lost, All other edits will be saved. It is
>>> important to review all your changes after doing a partial save (the changes
>>> will be outlined), because it may generate errors on the map do to the edits
>>> that weren't saved.
I agree, and I'd like a way to protect users from unexpected problems.
I don't see exactly how to determine what the appropriate partial save
is. When there's a failure, the server doesn't know which feature in the
save was the culprit and it's not possible to make this identification
robustly. So figuring out what the right partial save is has be
iterative somehow - and spraying data at the server until something
sticks sounds risky to me.
In the specific case of simultaneous edits to the same feature, for some
time we've wanted a way to untangle these conflicts (e.g.,
http://bugs.grouplens.org/show_bug.cgi?id=1337), and it's
straightforward to identify this case (it will be a primary key error).
In this case what I think we want is conflict-resolution code, not
partial saves.
Reid
> Yes iterative is kind of ugly. But if we had no way to handle unforeseen
> errors; what about two phase commits? Admittedly, my knowledge of databases
> is dismal. But a post I found said "If the precommit succeeds, then the
> database is telling you that it guarantees that the commit will succeed " So
> in principle you could prepare/rollback each edit to find which to throw out
> before committing the partial save.
Two-phase commit doesn't apply in this case (it's at a lower level), but
I can see where you're coming from: we could iteratively save rows and
if one row failed, remove it, back up, and proceed.
The drawback of this approach is that it's very handy to let a partial
transaction be internally inconsistent: for example, ratings have to
refer to blocks that exist, but it's nice to be able to save all ratings
before any blocks. If we delay the consistency check until we commit, we
don't have to worry about these temporary inconsistencies. (This is why
all the foreign keys are declared DEFERRABLE and transactions begin with
SET CONSTRAINTS ALL DEFERRED.)
So, we can't currently guarantee that a row is valid until we try to
commit the whole transaction.
> It just occurred to me that it's possible for an error to occur only with a
> combination of the edits. Ugg. I don't know how common this is.
It happens sometimes, though I also don't know how common it is.
Reid
-Michael