Fork me on GitHub

Hi all! Somebody get this exception init a peer?

#error {
:cause offset=0 length=32 not valid for capacity=0
[{:type java.lang.IllegalArgumentException
:message offset=0 length=32 not valid for capacity=0
:at [org.agrona.concurrent.UnsafeBuffer wrap 211]}]
[[org.agrona.concurrent.UnsafeBuffer wrap 211]
[org.agrona.concurrent.UnsafeBuffer init 114]
[io.aeron.CncFileDescriptor createMetaDataBuffer 166]
[io.aeron.CommonContext isDriverActive 453]
[io.aeron.driver.MediaDriver ensureDirectoryIsRecreated 334]
[io.aeron.driver.MediaDriver init 102]
[io.aeron.driver.MediaDriver launch 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 154]
[clojure.lang.AFn applyTo 144]
[clojure.lang.Var applyTo 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 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 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]


Solved clenaning aeron buffer /dev/shm…


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:


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


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


@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.


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


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


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


Anytime, thanks for pointing it out!


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


Ah, that'd explain it 🙂