VictoriaMetrics/app/vmauth
Aliaksandr Valialkin 83fc33af89
app/vmauth: simplify the logic for the fix at a0a154511a
The fix at a0a154511a looks too complicated and fragile:

- It moves buMin initialization to the place, which is far from its usage.
- It embeds unclear logic on selecting the proper buMin if it is broken,
  into unrelated loop.

The actual fix must be more clear:

$ git diff 95acca6b52 -- app/vmauth/

-               if n := bu.concurrentRequests.Load(); n < minRequests {
+               if n := bu.concurrentRequests.Load(); n < minRequests || buMin.isBroken() {

This should simplify further maintenance of this code.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/7489
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3061
2024-11-12 16:43:07 +01:00
..
deployment
multiarch
auth_config_test.go
auth_config.go app/vmauth: simplify the logic for the fix at a0a154511a 2024-11-12 16:43:07 +01:00
example_config_ent.yml
example_config.yml
main_test.go
main.go
Makefile
README.md
target_url_test.go
target_url.go

See vmauth docs here.

vmauth docs can be edited at docs/vmauth.md.