]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_odbc: cache_type option for res_odbc.
authorJaco Kroon <jaco@uls.co.za>
Tue, 10 Dec 2024 20:36:02 +0000 (22:36 +0200)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Wed, 11 Jun 2025 13:00:44 +0000 (13:00 +0000)
commit497eba49014fcbd0aa4ff8ff9c21743261d582d4
treead17d87bccd15ebf6d3e74bec1fa6b997f710276
parentc7a82711f628f62efe9ddbd51f420d12a4e59389
res_odbc: cache_type option for res_odbc.

This enables setting cache_type classes to a round-robin queueing system
rather than the historic stack mechanism.

This should result in lower risk of connection drops due to shorter idle
times (the first connection to go onto the stack could in theory never
be used again, ever, but sit there consuming resources, there could be
multiple of these).

And with a queue rather than a stack, dead connections are guaranteed to
be detected and purged eventually.

This should end up better balancing connection_cnt with actual load
over time, assuming the database doesn't keep connections open
excessively long from it's side.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
UserNote: When using res_odbc it should be noted that back-end
connections to the underlying database can now be configured to re-use
the cached connections in a round-robin manner rather than repeatedly
re-using the same connection.  This helps to keep connections alive, and
to purge dead connections from the system, thus more dynamically
adjusting to actual load.  The downside is that one could keep too many
connections active for a longer time resulting in resource also begin
consumed on the database side.
configs/samples/res_odbc.conf.sample
res/res_odbc.c