I have documents A and B where A needs to be synced before B.
Can I use a push filter and pendingDocumentIDs to do this? My plan was to, in the push filter, check the if A is in pending docs, and block B if it is. Will this work?
My use case is that both documents were created when the app was offline and are synced at the same time.
If you do this, there is a chance that B will not sync at all. If you want to do this logic, you can set up a second one shot replicator with docIDs filtered to just A, run that to completion, and then start the normal replication.
Well, the info I gave is kind of it from my POV. A and B are ingested by a service and in order for B to be processed correctly, A needs to be processed first.
I’m a mobile dev but if this is better fixed at sync gateway I’d be happy with that. On the mobile side we have one DB with a push-pull, continuous replicator and multiple other read-only replicators for other DBs. We had a previous attempt at integrating one-shot replicators into the app but not in this particular way, so the previous suggestion may be viable.