pub async fn drain<T: RagTransport>(
vault: &NoteVault,
dirty: &DirtySet,
transport: &T,
) -> Result<bool, RagError>Expand description
Flushes the dirty-set to the server. Failed operations are re-queued so the next drain (or a reconcile) retries them.
Returns false (doing nothing) when the local index is not ready: an
unready (healed/rebuilding) index reads as empty, so build_doc would find
no chunks and turn queued upserts into server-side deletes. The dirty-set
stays queued until the index is filled; callers should retry then.