Title: #5552: files: split update into batches
> The reason why the message is not delivered is because we send
it over `provider->sbus_conn` which requires accessing the backend's tevent loop
because the backend runs this message bus. If `be_ctx->mon_conn` is used instead the
message is sent through the monitor's message bus immediately.
this sounds like the proper solution for #5091. There were discussions about dropping the
monitor and relying on systemd to start the SSSD components. I do not remember the current
state of those discussions but if we ever want to move that way this would be another task
of the monitor which must be replaced.
Ideally, we want to spawn private session of dbus-broker and use only one private message
bus instead of running multiple. But so far we can use the monitor for situations like
About transition to systemd, I'm all for it. We already rely on systemd at some places
anyway so I think it is time to finally drop the monitor. But lets not discuss it here.
About @elkoniu's suggestion to wait with the processing of the
files until the messages are send. This can be easily combined with @alexey-tikhonov
's original understanding of batches where we should not immediately start processing
if we are notified of a change but wait for e.g. 1s of inactivity on the files and start
processing. With this we should be long enough in the event loop to properly finish the
communication with the NSS responder, but I guess you would still recommend to send the
message via the monitor?
If the processing is delayed then the provider gets to the loop and sends the message so
monitor is not needed in this case.
where do you see the difficulties to add a diff approach? The step
the remove the cache has to be replaced by the diff step and then the entries which
changed will be processed. Even with the diff approach we might need process the changes
in batches if there are many to not block the backend for too long.
Let me ask a question first - if the domain is correctly marked as inconsistent, why do we
need to have the files backend responsive?
See the full comment at https://github.com/SSSD/sssd/pull/5552#issuecomment-814906355