Fork me on GitHub
#xtdb
<
2019-06-19
>
denik01:06:39

trying to use sync to block until writes have been indexed and hitting this error:

(crux/sync system #inst "2019-06-19T01:00:48.418-00:00" (Duration/ofMillis 10))
; => java.time.Duration cannot be cast to java.lang.Number
it works when timeout = nil (Duration/ofMillis 10) also works by itself

refset17:06:24

Hi again, I haven't attempted to reproduce this yet, but did you figure it out already? There is an example in the tests which suggests the timeout should be working https://github.com/juxt/crux/blob/83d39999064c804dccbba4f850da5d1da5931fe7/test/crux/api_test.clj#L59 (this is a long shot...) does (Duration/ofSeconds 10) also not work for you there?

denik14:06:40

The 2-arity call works. It breaks at 3, when there is both , a ^Date transaction-time and ^Duration timeout. I'm currently passing nil for timeout which works

refset18:06:46

Yep this looks like a bug, I opened an issue. Again, we will take a look on Monday's standup: https://github.com/juxt/crux/issues/268

refset18:06:28

(also sorry I misread your code the first time around!)

๐Ÿ™ 4
grahamcarlyle08:06:46

FYI i think the version number mentioned in the docs https://juxt.pro/crux/docs/configuration.html#standalone โ€œโ€19.06-1.6.0-alphaโ€" isnt available in central repository, whereas the version mentioned on https://github.com/juxt/crux is ok โ€œ19.06-1.1.0-alphaโ€

๐Ÿ‘ 4
mpenet10:06:35

is there a video of yesterdays meetup?

refset12:06:50

Hi ๐Ÿ™‚ yes, coming soon! It generously recorded by Funding Circle. Fingers crossed it looks and sounds okay. I will circulate the slides and links for everything in any case

mpenet12:06:57

great! please do ๐Ÿ™‚

โœ”๏ธ 4
grahamcarlyle12:06:37

i also needed to add an :event-log-dir setting when following the subsequent standalone system steps

(def ^crux.api.ICruxAPI system
  (crux/start-standalone-system {:kv-backend "crux.kv.memdb.MemKv"
                                 :db-dir "data/db-dir-1"}))
Execution error - invalid arguments to crux.bootstrap.standalone/start-standalone-system at (standalone.clj:85).
{:kv-backend "crux.kv.memdb.MemKv", :db-dir "data/db-dir-1"} - failed: (contains? % :event-log-dir)
(def ^crux.api.ICruxAPI system
  (crux/start-standalone-system {:kv-backend "crux.kv.memdb.MemKv"
                                 :db-dir "data/db-dir-1"
                                 :event-log-dir "log"}))
Jun 19, 2019 1:42:43 PM clojure.tools.logging$eval1576$fn__1579 invoke
WARNING: Using fsync on MemKv has no effect.
Jun 19, 2019 1:42:43 PM clojure.tools.logging$eval1576$fn__1579 invoke
WARNING: Using sync? on MemKv has no effect. Persistence is disabled.
=> #'user/system

refset13:06:21

Glad you weren't too stumped by this. It is on our radar as of yesterday. I think it unintentionally slipped through as a regression in a recent commit, see https://github.com/juxt/crux/issues/261