I2P Address: [http://git.idk.i2p]

Skip to content

NetDB: SubDB lifecycle fixes (Gitlab #406)

zzz requested to merge zzz/i2p.i2p:406-lifecycle into master

This should resolve the remaining portion of #406 (closed).

Tested both functionally and with VisualVM to verify that the FNDF objects do not leak after client/subdb shutdown.

major:

  • Disable RefreshRoutersJob for subdbs, not required
  • Cancel ExpireRoutersJob and ExpireLeasesJob at netdb shutdown
  • Do not run ExpireRoutersJob at shutdown for subdbs, they are transient
  • Do not create _exploreKeys HashMap for subdbs, and add checks for subdbs attempting to access
  • Convert NegativeLookupCache timer to SimpleTimer2 so we may cancel it
  • Add method to cancel NegativeLookupCache timer; cancel it when netdb shuts down

minor:

  • Revert unnecessary subdb check in FloodfillMonitorJob, it is not instantiated for subdbs
  • Revert unnecessary changes to KNDF.getDbDir() that were for reverted persistent subdbs, and add javadocs
  • Revert changes in initialization of _dbDir in KNDF.startup()
  • Disable and deprecate KNDF.restart(), it is unused, untested, and broken
  • Remove DataStore.restart() and extensions, they are unused
  • Cleanup unnecessary setting things to null that already are
  • Cleanup in FNDF super.isMainDb() to simply isMainDb(); there is no override in FNDF to avoid

Not addressed here:

Closes #406 (closed)

Merge request reports

Loading