Opened 12 years ago

Closed 12 years ago

#476 closed defect (fixed)

Duplicating segments & nodes

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

Description

I'm not sure under what circumstances this occurs, and it may be when I myself do something wrong, but I have noticed duplicated nodes, and segments.

Occasionally I have noticed these duplicated segments form a way as well.

It is possible that these occur when either a way is split using Potlatch, or when a new way is joined onto an existing one with a new node. (maybe its not exactly the fault of Potlatch but due to the server being unresponsive [lots of 500 Internal server Errors being reported by JOSM today] and not all of Potlatch's edits get uploaded to the server?)

Change History (2)

comment:1 Changed 12 years ago by richard@…

Status: newassigned

It seems likely that this happens when the server is slow.

When Potlatch uploads a new way, the sequence goes something like this:

  1. Potlatch SWF sends "putway" message to server
  2. Server creates any nodes not in the previous version of the way
  3. Server creates any segments not in the previous version of the way
  4. Server deletes any nodes and segments not in the new version of the way
  5. Server saves way_segments records to link the segments together as a way
  6. Server returns "ok" and new way/node/segment IDs
  7. Potlatch SWF updates its (internal) way object with the new details

This means that if the server is slow, and the user edits a way twice in succession, the nodes and segments will be created twice - because the second "putway" will be sent before the object has been updated in step 6.

Probably the best way to fix this is for Potlatch only to send "putway" for a given way when all previous putways on that way have been successfully returned.

comment:2 Changed 12 years ago by richard@…

Resolution: fixed
Status: assignedclosed

Above problem hopefully fixed in r3049, please test (once deployed!) and reopen if not satisfactory.

Note: See TracTickets for help on using tickets.