Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Arrays in optargs #196

Open
jwr opened this issue Jun 14, 2018 · 0 comments
Open

Arrays in optargs #196

jwr opened this issue Jun 14, 2018 · 0 comments

Comments

@jwr
Copy link
Contributor

jwr commented Jun 14, 2018

I am trying to run reconfigure, but it seems that I can't pass an array in optargs. The following code:

(defn setup-replication! []
  (q (r/reconfigure {:shards 1
                     :replicas {"primary" 1
                                "secondary" 2}
                     :primary-replica-tag "primary"
                     :nonvoting-replica-tags ["secondary"]})))

fails with:

1. Unhandled clojure.lang.ExceptionInfo
   RethinkDB server: Expected a TermType as a NUMBER but found STRING.
   {:type :compile,
    :response
    {:t 17,
     :r ["Expected a TermType as a NUMBER but found STRING."],
     :b ["nonvoting_replica_tags"]}}

removing the brackets around "secondary" results in:

1. Unhandled clojure.lang.ExceptionInfo
   RethinkDB server: Expected type ARRAY but found STRING: "secondary"
   {:type :query-logic,
    :response
    {:t 18,
     :e 3000000,
     :r ["Expected type ARRAY but found STRING:\n\"secondary\""],
     :b ["nonvoting_replica_tags"]}}

It seems like the Clojure vector is not being converted into a RethinkDB ARRAY.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant