Skip to main content

max_string_func_result_bytes

Function max_string_func_result_bytes 

Source
pub fn max_string_func_result_bytes(temp_storage: &RowArena) -> usize
Expand description

The largest result a string function may build into temp_storage.

MAX_STRING_FUNC_RESULT_BYTES unless the arena carries a tighter budget, which is how an expression evaluated in environmentd on behalf of a request (a webhook CHECK) is held to a size proportionate to that request rather than to the constant, which is sized for a cluster.

A function that can predict its result size must consult this before building the result: the arena’s own budget is only observable after the bytes exist, which for an amplifying function is exactly too late.