Graylog2 / Graylog2/graylog2-server
Move Mongo Index Creations out of constructors into a separate Module
- Dominant language
- Java
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 217
Description
JAX-RS Resources by default are not singletons. This in some cases, causes a recreation of MongoDb Indexes for each incoming request.
## Expected Behavior
MongoDb indexes are created once during startup
## Current Behavior
MongoDB indexes are created for each incoming request. e.g. `/api/system/indices/index_sets/`
## Possible Solution
Suggest that after migrations are run, indexes are created.
## Steps to Reproduce (for bugs)
1. Set up tracing with JAEGER
2. Call /api/system/indices/index_sets/ and check traces
3.
4.
## Context
## Your Environment
* Graylog Version:
* Java Version:
* Elasticsearch Version:
* MongoDB Version:
* Operating System:
* Browser version:
Contributor guide
Assessment
This issue has not been assessed yet.