Modify

Opened 4 years ago

Closed 4 years ago

#2418 closed enhancement (fixed)

Refactor: Asynchronous and cancellable upload

Reported by: anonymous Owned by: team
Priority: minor Component: Core
Version: latest Keywords:
Cc: jpstotz@…, karl.guggisberg@…

Description

I edited some data, then I started to upload them. The upload window seems to be stuck (I saw last status message from previous batch of uploads) and nothing happened. I thought the server is probably overloaded or something like that and I pressed cancel. The status message was replaced by mesage saying "Aborting..." and cancel is greyed out. No way to get rid of that window now ....

I think aborting the upload should be immediate - what is so difficult on just closing the TCP connection?

Now the "Aborting..." window blocks me from saving my work for uploading it later :(

Attachments (0)

Change History (3)

comment:1 Changed 4 years ago by jpstotz

  • Cc jpstotz@… added
  • Summary changed from Data loss due to inability to abort data upload to Aborting OSM upload not possible due to missing implementation

Well after checking the source code it doesn't surprises me that the cancel button does not work. If I am right the code behind this button is in
src/org/openstreetmap/josm/actions/UploadAction.java line 186:

// FIXME server.cancel();

Further investigations showed that aborting an upload is currently (SVN 1567) not implemented at all. From my point of view implementing it would require changes to the classes UploadAction, OsmServerWriter and OsmApi.

comment:2 Changed 4 years ago by Gubaer

  • Cc karl.guggisberg@… added
  • Priority changed from critical to minor
  • Summary changed from Aborting OSM upload not possible due to missing implementation to Refactor: Asynchronous and cancellable upload
  • Type changed from defect to enhancement

This has been fixed in r1581.

OsmApi now launches an asynchronous upload task. It works but it is probably the wrong place to fix it. As you point out, it would be better to add cancel() to OsmServerWriter and fix
// FIXME server.cancel(); in UploadAction.

Since the patch for r1581 was mine I'll have to patch my patch ;-) In the meantime I set priority to minor a change the ticket to an enhancement.

comment:3 Changed 4 years ago by Gubaer

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

this is fixed in the meantime

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.