diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-06-02 18:19:13 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-06-09 10:32:07 -0500 |
commit | 4879cd875c932817c8259934814dd18cf15f5a1c (patch) | |
tree | 3fe532f547ee0b170cd0f1e293d5ed20d91fb2fe /include | |
parent | 2cd67d5b07d28891ea7c86aece702a4d6e436afc (diff) |
sorcery: Add setting object type congestion levels.
Sorcery creates taskprocessors for object types to process object observer
callbacks. An API call is needed to be able to set the congestion levels
of these taskprocessors for selected object types.
* Updated PJSIP's contact and contact_status sorcery object type observer
default congestion levels based upon stress testing. Increased the
congestion levels to reduce the potential for bursty register/unregister
and subscribe/unsubscribe activity from triggering the taskprocessor
overload alert.
ASTERISK-26088
Reported by: Richard Mudgett
Change-Id: I4542e83b556f0714009bfeff89505c801f1218c6
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/sorcery.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asterisk/sorcery.h b/include/asterisk/sorcery.h index 42ecc133f..23219ec41 100644 --- a/include/asterisk/sorcery.h +++ b/include/asterisk/sorcery.h @@ -695,6 +695,20 @@ int __ast_sorcery_object_register(struct ast_sorcery *sorcery, const char *type, __ast_sorcery_object_register((sorcery), (type), 1, 1, (alloc), (transform), (apply)) /*! + * \brief Set the high and low alert water marks of the sorcery object type. + * \since 13.10.0 + * + * \param sorcery Pointer to a sorcery structure + * \param type Type of object + * \param low_water New queue low water mark. (-1 to set as 90% of high_water) + * \param high_water New queue high water mark. + * + * \retval 0 on success. + * \retval -1 on error (water marks not changed). + */ +int ast_sorcery_object_set_congestion_levels(struct ast_sorcery *sorcery, const char *type, long low_water, long high_water); + +/*! * \brief Set the copy handler for an object type * * \param sorcery Pointer to a sorcery structure |