Closed samkelleher closed 3 years ago
Yup, you're right, the API has changed since this was first implemented. Looks like there is now a primary_replica_tag
field rather than datacenter
. Will have to update this, and this time find a way to write some relevant integration tests, as this should've been caught by tests.
This one in particular is complicated because the primary replica tag needs to be supplied along side the actual list of replicas you want to create. I.e. the primary tag must be in the list. So this particular method would need to have that too. There's also a bunch of other options available when creating a table related to replicas and sharding, like non-voting replicas. So maybe a method that accepts a dynamic object that is serialised would be more flexible and allow adding and removing options as RethinkDB changes.
I think the API for it on RethinkDB has since changed. Using RethinkDB v2.2.2