New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incomplete ways after restoring #2142
Comments
|
Oh, damn, I forgot about the assumed invariant that a way always comes with all its child nodes. It's a pretty widespread assumption in the code, so it will be tricky to try and relax it. I agree that including child nodes in localStorage is also unattractive, but I think that's the only way to preserve the child nodes invariant. I thought about a different fix for #2134, like if an entity kept track of whether it was new or not, so that it would be possible to determine modified vs created without keeping track of the base entity. But that still leaves modified versions of restored ways without their child nodes. |
I gave some thought to it, and it's also a requirement for all sorts of operations with the ways (e.g. rendering them) The |
|
Yeah, that's another idea. The difficulties there are:
|
If we're going to punt on conflict resolution, it's much better to do it early before the user does additional work, so I'd consider this a plus.
Although it sucks to block, is it better than storing everything in localStorage? I don't think it'd be blocking too long, I consider both |
|
Isn't conflict resolution a more general problem and not particularly related to this issue here? I mean, conflicts could come up even after "regular" restores, when fresh (and possibly conflicting) data is loaded via the |
|
from @pnorman
I'm planning to fix this with from @jfirebaugh
I found with conflict resolution that
Existing conflict resolution will handle added nodes (the user just won't see them until they save and see the conflict resolution UI). If the |
(see #2142) TODO: fetch older version if the node has been deleted.
|
Today I realized:
This was implemented in a393248, 970a5de and fixes a lot of the Entity Not Found errors that can occur after the user restores their history. |
After #2135 the graph can contain incomplete ways (i.e. ways where one or more of its nodes are not present in the graph - just like incomplete relations) under certain circumstances. For example:
I noticed that this causes problems with the current multipolygon code: it causes
entity nxxx not foundexceptions duringgraph.childNodes()because some nodes are in fact missing.I'm not sure how to fix this properly. A possible fix (for the multipolgon case) would be to add something like the following to the relation member filter:
Another fix would be to include all involved (but most of the time unchanged) childNodes in the localStorages saves. But this would potentially quite blow up the amount of data to be stored.
Also, I'm not sure if similar exceptions could come up in other modules, too?
The text was updated successfully, but these errors were encountered: