You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The database index should only be created once, to ensure there's a unique index on the collection.
Current Behavior
Every time a token is a saved, including when its access time is updated, the index gets recreated.
This leads to at least an additional table lock, and extra work on index creation in the background. On systems with lots of sidecars this creates performance problems.
Expected Behavior
The database index should only be created once, to ensure there's a unique index on the collection.
Current Behavior
Every time a token is a saved, including when its access time is updated, the index gets recreated.
This leads to at least an additional table lock, and extra work on index creation in the background. On systems with lots of sidecars this creates performance problems.
Possible Solution
In https://github.com/Graylog2/graylog2-server/blob/master/graylog2-server/src/main/java/org/graylog2/security/AccessTokenServiceImpl.java#L142 move the
createIndex
call to the constructor.Steps to Reproduce (for bugs)
Code pointer above.
Context
Each access token use will save it to the database, leading to excessive queries.
Your Environment
The text was updated successfully, but these errors were encountered: