diff --git a/astrapy/db.py b/astrapy/db.py index 3c28b147..26456a19 100644 --- a/astrapy/db.py +++ b/astrapy/db.py @@ -770,6 +770,12 @@ def chunked_insert_many( """ results: List[Union[API_RESPONSE, Exception]] = [] + # Raise a warning if ordered and concurrency + if options and options.get("ordered") is True and concurrency > 1: + logger.warning( + "Using ordered insert with concurrency may lead to unexpected results." + ) + # If we have concurrency as 1, don't use a thread pool if concurrency == 1: # Split the documents into chunks