Bug #4262

mentat-enricher.py - When reloaded enrichment plugins should be able to retain their internal state

Added by Jan Mach 12 months ago. Updated 10 months ago.

Status:ClosedStart date:08/13/2018
Priority:NormalDue date:
Assignee:Jan Mach% Done:

100%

Category:Development - Core
Target version:2.1

Description

Currently all enrichment plugins are hard reloaded and their internal state is lost. This behavior was sufficient for all currently implemented plugins, however in some use cases this approach results in data and performance loss (for example in case of enrichment plugins which use internal caching mechanism).

Associated revisions

Revision a926e9f1
Added by Jan Mach 10 months ago

Fix: Enricher plugins can now keep their internal state during reloads.

Previously the enrichment plugin reload was hardcoded in a way, that during the reload a brand new instance of the plugin was created, which resulted in discarding of the internal state of the plugin. For some use cases this was not appropriate. The plugin reload event is now implemented differently, so the insternal state is kept. (Redmine issue: #4262)

Revision 2c9fb952
Added by Jan Mach 10 months ago

Improved coding style, unit tests and doumentation of IDEA message enrichment plugins.

(Redmine issue: #4262,#1017,#3443)

Revision 7c94b144
Added by Jan Mach 10 months ago

Fix: Removed component identification from enrichment plugin log lines.

The component identification is not available through daemon object. (Redmine issue: #4262,#3443)

History

#1 Updated by Pavel Kácha 11 months ago

Wouldn’t make more sense to not restart the whole daemon, but to give enricher plugins means to reload their data themselves? As far as I understand, design is event based, so plugins could schedule their own (and only their own) data reload as they see fit.

#2 Updated by Jan Mach 10 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Resolved this issue by not discarding the whole plugin instances during reload. Instead the plugin`s setup() method is called on each of the plugins. So it is up to the plugin to decide whether it is time to reload internal state.

Also available in: Atom PDF