nats-io / nats-server

High-Performance server for NATS.io, the cloud and edge native messaging system.
https://nats.io
Apache License 2.0
16k stars 1.41k forks source link

[WIP][FIXED] Fix request/reply performance when using allow_responses perms #6064

Open jack7803m opened 3 weeks ago

jack7803m commented 3 weeks ago

Fixes performance issues noted in #6058. Attempts to prune reply map every replyPermLimit messages or if it has been more than replyPruneTime since the last prune.

Resolves #6058

Signed-off-by: Jack Morris jack@jackmorris.me

jack7803m commented 3 weeks ago

Unsure how those failing tests could be affected by the minimal changes I made.

Still need to add some sort of solution to the infinite expiry, though I'm not sure exactly what direction to go with that (i.e. error or set to a default), so I'll leave that decision up to the maintainers.