Hi @jonathan3. Thank you for this question and sorry it’s taken so long to response.
I just posted an answer with relevant recommendations here. But to save you time:
If it’s essential for your use case to lock reads (queries) until you can ensure data is available, we recommend either fetching by the ID of the record or comparing the LSN of the write to the LSN of a query. Every operation gets an LSN (log sequence number), and they are monotonically increasing, so as soon as the LSN of the query is higher than the LSN of the write, your data is available.
I know the docs recommend repeatedly calling describe_index_stats
, which isn’t a practical or useful approach in cases like yours. I’ll make sure we update our docs.
Hope that helps. Please let me know.
Best,
Jesse