onyx

FYI: alternative Onyx :onyx: chat is at <https://gitter.im/onyx-platform/onyx> ; log can be found at <https://clojurians-log.clojureverse.org/onyx/index.html>
lellis 2018-02-05T13:25:01.000370Z

Hi all! Somebody get this exception init a peer?

#error {
:cause offset=0 length=32 not valid for capacity=0
:via
[{:type java.lang.IllegalArgumentException
:message offset=0 length=32 not valid for capacity=0
:at [org.agrona.concurrent.UnsafeBuffer wrap UnsafeBuffer.java 211]}]
:trace
[[org.agrona.concurrent.UnsafeBuffer wrap UnsafeBuffer.java 211]
[org.agrona.concurrent.UnsafeBuffer init UnsafeBuffer.java 114]
[io.aeron.CncFileDescriptor createMetaDataBuffer CncFileDescriptor.java 166]
[io.aeron.CommonContext isDriverActive CommonContext.java 453]
[io.aeron.driver.MediaDriver ensureDirectoryIsRecreated MediaDriver.java 334]
[io.aeron.driver.MediaDriver init MediaDriver.java 102]
[io.aeron.driver.MediaDriver launch MediaDriver.java 218]
[onyx.messaging.aeron.embedded_media_driver.EmbeddedMediaDriver start embedded_media_driver.clj 33]
[onyx.messaging.aeron.messaging_group.AeronMessengerPeerGroup start messaging_group.clj 49]
[com.stuartsierra.component$fn__47046$G__47040__47048 invoke component.cljc 5]
[com.stuartsierra.component$fn__47046$G__47039__47051 invoke component.cljc 5]
[clojure.lang.AFn applyToHelper AFn.java 154]
[clojure.lang.AFn applyTo AFn.java 144]
[clojure.lang.Var applyTo Var.java 702]
[clojure.core$apply invokeStatic core.clj 659]
[clojure.core$apply invoke core.clj 652]
[com.stuartsierra.component$try_action invokeStatic component.cljc 117]
[com.stuartsierra.component$try_action invoke component.cljc 116]
[com.stuartsierra.component$update_system$fn__47097 invoke component.cljc 139]
[clojure.lang.ArraySeq reduce ArraySeq.java 114]
[clojure.core$reduce invokeStatic core.clj 6747]
[clojure.core$reduce invoke core.clj 6730]
[com.stuartsierra.component$update_system invokeStatic component.cljc 135]
[com.stuartsierra.component$update_system doInvoke component.cljc 129]
[clojure.lang.RestFn invoke RestFn.java 445]
[com.stuartsierra.component$start_system invokeStatic component.cljc 163]
[com.stuartsierra.component$start_system invoke component.cljc 155]
[onyx.system.OnyxPeerGroup$fn__64983 invoke system.clj 119]
[onyx.system$rethrow_component invokeStatic system.clj 67]
[onyx.system$rethrow_component invoke system.clj 65]

lellis 2018-02-05T14:45:32.000320Z

Solved clenaning aeron buffer /dev/shm…

👍 1
2018-02-05T22:14:41.000313Z

not sure if anyone can answer this, but in the onyx-elastic search plugin it appears that upserts don’t use the upsert function from the underlying library, instead it switches on the doc id and does a put or a create instead: https://github.com/onyx-platform/onyx-elasticsearch/blob/0.9.x/src/onyx/plugin/elasticsearch.clj#L222

2018-02-05T22:14:55.000195Z

I’m not sure if I’m missing the reasoning behind that

2018-02-05T22:16:41.000116Z

I’m happy to fork and submit a PR but if there’s some reason upsert is avoided I’d skip it

michaeldrogalis 2018-02-05T22:19:11.000417Z

@jgerman I'm not sure that anyone here can answer that. The ElasticSearch plugin was user-contributed quite a while ago, and no one on the core team has worked with ES before.

michaeldrogalis 2018-02-05T22:19:21.000340Z

Happy to take a fix if it looks right to you.

2018-02-05T22:23:01.000190Z

heh, no problem, I wanted to check first, I wonder about changing the behavior of upsert since people may depend on it

2018-02-05T22:23:10.000060Z

but that’s easy enough to work around, thanks!

michaeldrogalis 2018-02-05T22:26:02.000342Z

Anytime, thanks for pointing it out!

2018-02-05T22:36:36.000056Z

no problem, it looks like the plugin uses an older version of elastisch which doesn’t have the upsert, I’ll see if I can unwind all this

michaeldrogalis 2018-02-05T22:39:54.000450Z

Ah, that'd explain it 🙂

2018-02-05T22:40:53.000310Z

yep lol