• Shaya Potter's avatar
    RM_Call - only enforce OOM on scripts if 'M' flag is sent (#11425) · 38028dab
    Shaya Potter authored
    
    
    RM_Call is designed to let modules call redis commands disregarding the
    OOM state (the module is responsible to declare its command flags to redis,
    or perform the necessary checks).
    The other (new) alternative is to pass the "M" flag to RM_Call so that redis can
    OOM reject commands implicitly.
    
    However, Currently, RM_Call enforces OOM on scripts (excluding scripts that
    declared `allow-oom`) in all cases, regardless of the RM_Call "M" flag being present.
    
    This PR fixes scripts to be consistent with other commands being executed by RM_Call.
    It modifies the flow in effect treats scripts as if they if they have the ALLOW_OOM script
    flag, if the "M" flag is not passed (i.e. no OOM checking is being performed by RM_Call,
    so no OOM checking should be done on script).
    Co-authored-by: default avatarOran Agra <oran@redislabs.com>
    38028dab
misc.tcl 13.8 KB