7443498 BE: Send refresh requests in batches

Authored and Committed by jhrozek 4 years ago
    BE: Send refresh requests in batches
    
    As we extend the background refresh into larger domains, the amount of
    data that SSSD refreshes on the background might be larger. And
    refreshing all expired entries in a single request might block sssd_be
    for a long time, either triggering the watchdog or starving other
    legitimate requests.
    
    Therefore the background refresh will be done in batches of 200 entries.
    The first batch of every type (up to 200 users, up to 200 groups, ...)
    will be scheduled imediatelly and subsequent batches with a 0.5 second
    delay.
    
    Related:
    https://pagure.io/SSSD/sssd/issue/4012
    
    Reviewed-by: Sumit Bose <sbose@redhat.com>
    
        
file modified
+113 -18
file modified
+4 -4
file modified
+8 -0