Ticket #1154 (closed defect: fixed)

Opened 6 years ago

Last modified 5 years ago

Newly created ways showing duplicate nodes on screen and possibly not getting saved.

Reported by: daveemtb Owned by: richard@…
Priority: major Milestone:
Component: potlatch (flash editor) Version:
Keywords: Cc:

Description

While tracing on Porto Santo Island (NE of Madeira) I found a very frustrating intermittent bug, as it results in lost work.

When drawing a way, about 2 seconds after deselecting, some of the nodes show duplicates, where the green dot has a node number as if it's been uploaded, but the node in the way itself actually has a negative number. After a few more seconds, quite a few of the duplicate green nodes dissapear simultaneously, but some always remain. If you then drag the way, the green node stays in place, while the nodes connected to the way move.

I have found a number of ways that I saw this happen to had dissapeared when I came back to do further work on the area. I suspect they were never saved. The warning icon does not flash up when this has occurred. I think from experimentation that dragging the way, deselecting it, then dragging it back, may avoid the way not being saved. However, it's hard to be sure because the way isn't always lost when the duplicate nodes occur anyway.

I have a suspicion that the problem occurs most often when you drag the background to move the view (to continue tracing a way that goes off the edge of the currently visible area) before deselecting the way. However, I don't think this is the only circumstance in which the problem occurs.

Change History

comment:1 follow-up: ↓ 2 Changed 6 years ago by Richard

  • Priority changed from blocker to major

Two issues here.

The "green nodes appearing" bug is a known issue in times of high server load, when you drag the map while the way is being written.

Dragging the map causes Potlatch to ask for a new list of ways/nodes from the server (for the new area). If the server is halfway through writing the way, the constituent nodes will have been written, but not the way itself. This means that the nodes appear to Potlatch as POI nodes (i.e. not part of a way), so it displays them as such.

Potlatch should remove them from view as soon as the way has been written. However, the node handling was completely rewritten in 0.10 and this bit appears not to have survived the change. It should be fixed in 0.10c.

Ways not being written isn't directly connected with this. However, it does indicate that the server was under high load at the time; and when that happens, the server may drop write requests.

I'd like to add something to Potlatch to 'mop up' any ways for which the server hasn't responded "Ok, that's been written successfully"; but it's not easy, because there's actually no efficient way in the current API (that I know of) to do that. It's not uncommon that the server has actually written the way but hasn't returned a success code to Potlatch; so Potlatch is still waiting for the way to return, whereas as far as the server is concerned, everything is hunky dory. Bright ideas welcome (patches even more welcome).

comment:2 in reply to: ↑ 1 Changed 6 years ago by daveemtb

Ok, sorry for the part duplication then, I did try to find any open tickets for the issue, but was probably looking for the wrong thing.

If I had any coding skills at all, I'd chip in - afraid I have never been terribly successful in that field, though. :(

Sounds like it's a bit of an issue with the API then I guess :( Should a ticket be raised for this? Out of interest, how does Potlatch know to show the error symbol, and under what circumstances does this occur?

In terms of a temporary fix for the green nodes issue, would it help to make Potlatch in effect deselect the way and reselect it upon moving the map or would that just worsen the server load issue?

Best regards, and thanks for all your work on Potlatch.

Dave

Replying to Richard:

Two issues here.

The "green nodes appearing" bug is a known issue in times of high server load, when you drag the map while the way is being written.

Dragging the map causes Potlatch to ask for a new list of ways/nodes from the server (for the new area). If the server is halfway through writing the way, the constituent nodes will have been written, but not the way itself. This means that the nodes appear to Potlatch as POI nodes (i.e. not part of a way), so it displays them as such.

Potlatch should remove them from view as soon as the way has been written. However, the node handling was completely rewritten in 0.10 and this bit appears not to have survived the change. It should be fixed in 0.10c.

Ways not being written isn't directly connected with this. However, it does indicate that the server was under high load at the time; and when that happens, the server may drop write requests.

I'd like to add something to Potlatch to 'mop up' any ways for which the server hasn't responded "Ok, that's been written successfully"; but it's not easy, because there's actually no efficient way in the current API (that I know of) to do that. It's not uncommon that the server has actually written the way but hasn't returned a success code to Potlatch; so Potlatch is still waiting for the way to return, whereas as far as the server is concerned, everything is hunky dory. Bright ideas welcome (patches even more welcome).

comment:3 Changed 6 years ago by Richard

The "!" shows up when Flash Player tells Potlatch there's an error with the connection. This is either when a bad response is received (e.g. a 500 Internal Server Error), or when no response is received at all - i.e. a time-out.

Don't worry too much about raising an API ticket - that's really the sort of thing that the software author should do, I think. I'll continue to think on it.

cheers

Richard

comment:4 Changed 6 years ago by Richard

I _think_ the duplicate green nodes have gone now but would welcome further corroboration.

comment:5 Changed 5 years ago by Richard

  • Status changed from new to closed
  • Resolution set to fixed

No further feedback so assuming fixed.

Note: See TracTickets for help on using tickets.