nestjsx/crud

Support read replicas

panuhorsmalahti opened this issue · 0 comments

The framework should support read replicas for databases. Although the read replica can be configured in database configuration, the current implementation causes errors due to race conditions. For example in createOne, the new entity would be saved to the master database, but the saved entity would then be immediately read from the read replica, which could still be missing. (See https://github.com/nestjsx/crud/blob/master/packages/crud-typeorm/src/typeorm-crud.service.ts#L141).