kalisio / krawler

A minimalist (geospatial) ETL
https://kalisio.github.io/krawler/
MIT License
54 stars 13 forks source link

createMongoCollection hook does not wait for indices to be created #257

Closed claustres closed 1 year ago

claustres commented 1 year ago

Steps to reproduce

Add a createMongoCollection with a unique index rule then a callFeathersServiceMethod hook creating items with duplicated indices.

Expected behavior

Data with duplicated indices should not be inserted.

Actual behavior

Data with duplicated indices are inserted sometimes if write comes quickly after index creation.

System configuration

Module versions (especially the part that's not working): 2.5

NodeJS version: 16

Operating System: Windows