Graylog2 / Graylog2/graylog2-server

Move Mongo Index Creations out of constructors into a separate Module

Open
#15,227 0 comments 0 reactions 0 assignees View on GitHub
bug improvement performance
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.