Hyperfoil / Horreum

Benchmark results repository service
https://horreum.hyperfoil.io/
Apache License 2.0
34 stars 30 forks source link

Reduce the amount of calls to `RoleManager.setRoles` #1808

Open barreiro opened 1 week ago

barreiro commented 1 week ago

Fixes #1726

Sets the horreum.system role by default on the connection and only set roles when needed.

Also, the roles are set with transaction scope to avoid having to reset them.

This avoid most calls to setRoles for non-authentication usage and reduces to a single call when authenticated, for most cases.