Opened 2 years ago

Closed 2 years ago

#2508 closed defect (fixed)

I2PSnark: Torrent metadata is lost on restart

Reported by: Reportage Owned by: zzz
Priority: major Milestone: 0.9.41
Component: apps/console Version: 0.9.40
Keywords: i2psnark, metadata, dataloss Cc:
Parent Tickets: #1893 Sensitive: no


When the router is restarted, accumulated metadata is lost in I2PSnark: user-added comments and amount of data uploaded specifically.

This data should persist between restarts.


Change History (6)

comment:1 Changed 2 years ago by zzz

Comments are saved in SnarkManager?.stopAllTorrents(), but perhaps there's a bug somewhere.

Similarly, stopAllTorrents() does call Snark.stopTorrent() which calls SnarkManager?.updateStatus() which calls saveTorrentStatus(). Again, maybe there's bugs.

There's several cases - clicking stop all, vs. router shutdown… was the torrent running or not… and maybe others. So perhaps some cases work and some don't. But the design intent was to persist and the code's been in there for a long time. If you can identify particular cases that don't work that would be helpful.

comment:2 Changed 2 years ago by Reportage

The data loss invariably occurs when the router is restarted without explicitly stopping torrents first. I generally leave torrents running so can't comment on what happens when torrents are explicitly stopped before a shutdown is initiated.

comment:3 Changed 2 years ago by zzz

Sensitive: unset
Status: newaccepted

reproduced here, not unique to snark, none of the webapps are being shut down. stopAllWebapps() in RouterConsoleRunner? isn't stopping them because WebAppStarter?.isWebAppRunning() is returning false for all the webapps. Possibly some Jetty change is the cause. Investigating.

comment:4 Changed 2 years ago by zzz

Component: apps/i2psnarkapps/console
Milestone: undecided0.9.41
Priority: minormajor
Resolution: fixed
Status: acceptedclosed

Nope, broken by me in 0.9.38, console was unregistered early in the stop process which prevented any of the webapp stopping (including webapps in plugins) from firing.
In 3234c17a5ddde36d2432d37bc5deb767043cec1d 0.9.40-11

comment:5 Changed 2 years ago by Reportage

Parent Tickets: 1893
Resolution: fixed
Status: closedreopened

comment:6 Changed 2 years ago by Reportage

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.