Refactor lifecycle for lookup adapters and caches #3873
we use auxiliary servicemanagers to start lookup tables and use listeners to maintain the dependent services' state
caches and data adapters now run on their own, without being lazily loaded when a lookup table uses them this greatly simplfies the update and creation logic and makes it trivial to query the system state not all update/delete events are filled in the resource yet
The live tables might not be populated yet.
fix wrong state in logging service listener
improve logging with object ids
since we are sharing instances across lookup tables, the caches and adapters no longer have a back reference to the table this means the lookup table needs to orchestrate loading and caching only loading caches can use refreshAfterWrite, so we had to remove that option from the config make sure restarting caches and adapters is properly synchronized by waiting for all instances to be running
The LookupCacheKey consists of the actual key object and a prefix String to make it possible to cache the same key value for a different data adapter. Since cache instances can be shared between data adapters, cache values might be overwritten for different data adapters otherwise.
This decouples the data adapters from the caches and handles the refresh logic outside of the data adapter.
Do we need this to be
bernd merged commit
Jun 12, 2017
1 of 4 checks passed
1 of 4 checks passed
graylog-project/pr Jenkins build graylog-project-pr-snapshot 209 has failedDetails
continuous-integration/travis-ci/pr The Travis CI build is in progressDetails
continuous-integration/travis-ci/push The Travis CI build is in progressDetails
ci-web-linter Jenkins build graylog-pr-linter-check 1731 has succeededDetails
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments.