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>
lucasbradstreet 2018-01-22T00:00:11.000050Z

Does anyone know enough about upserts in mysql and postgresql to be able to review this PR from @niamu? I don’t have enough time to properly investigate at the moment https://github.com/onyx-platform/onyx-sql/pull/31

danielcompton 2018-01-22T01:07:25.000011Z

@lucasbradstreet I have done a little with PG upserts, I would want a few more tests around the different cases of executing the queries to make sure they are all handled correctly

danielcompton 2018-01-22T01:10:59.000108Z

But the PG one seems ok to me, and matches the kind of queries I have written in HugSQL

niamu 2018-01-22T01:25:44.000121Z

Documentation would still need to be improved before that gets accepted as well. I’ll expand on that a little more tomorrow.

niamu 2018-01-22T01:26:42.000160Z

It needs to be made clear that the :where map would need to have the primary key value present in order for the upserts to work.

lucasbradstreet 2018-01-22T03:00:41.000185Z

Thanks guys

michaeldrogalis 2018-01-22T03:53:06.000104Z

Much appreciated everyone.

2018-01-22T07:05:47.000152Z

I think when a duplicate key exception occurs, postgresql automatically aborts the current transaction

2018-01-22T07:06:05.000235Z

I see that multiple of these upserts are done in a single transaction tho

2018-01-22T07:06:53.000081Z

so I would like to take a better look at how hsql handles this

ninja 2018-01-22T15:04:21.000275Z

Hi @michaeldrogalis, I finally managed to put together a minimal reproducer to point out the problems I'm experiencing when using onyx with tags (wrote about this some days ago). You can find the example here: https://github.com/DiCanio/onyx-tag-usage-error I hope everything is covered by the README. If this is not the case for you please feel free to write me. Thanks in advance for your help.

michaeldrogalis 2018-01-22T15:41:44.001039Z

Great, thanks @atwrdik! Ill try to get to this one tonight, or if not in the next few days.

👍 1
niamu 2018-01-22T17:44:12.000254Z

Does anyone use Onyx for archiving Kafka topics and replaying the archive back to a Kafka topic? Can anyone recommend a process for Kafka archiving and replay-ability?

gklijs 2018-01-22T18:06:08.000130Z

@niamu as long as you configure the topic to never delete stuff, you could always read from tree beginning of a topic. Depending on use case, you can use compaction, so messages with the same key eventually do get deleted. You could also put each message in a database, and thus be able to play it back, but seems to make things unnecessary complex.

niamu 2018-01-22T18:50:04.000395Z

@gklijs Thanks. I’m not sure if it’s easier for us to be able to scale storage to some separate object store for Kafka messages or to scale the retention of Kafka itself. So that’s where some of the decision making comes in as well.

jasonbell 2018-01-22T18:51:19.000007Z

@niamu I used to use Onyx as a Kafka store to S3 with an ordered date/time so you had system of a record. That’s kinda got replaced with Kafka Connect now. If you want to keep the storage down it makes sense to do it.

michaeldrogalis 2018-01-22T18:54:26.000075Z

@atwrdik Pretty sure this is a bug in the scheduler. Thanks for the reproducer, makes my job a heck of a lot easier.

lucasbradstreet 2018-01-22T18:59:10.000422Z

@atwrdik could you please give it a try with onyx 0.12.3? We just merged https://github.com/onyx-platform/onyx/pull/837

michaeldrogalis 2018-01-22T19:01:03.000620Z

Oh, I hadn't even noticed that PR. Thanks @lucasbradstreet. I would have gone on a wild goose chase.

ninja 2018-01-22T20:08:35.000344Z

@lucasbradstreet @michaeldrogalis when using onyx 0.12.3 the job actually starts. However, it seems as if tasks are now assigned to peers that do not offer the required functionality/tags. Cannot estimate whether this has something to do with the changes from the PR or if the project is just misconfigured.

michaeldrogalis 2018-01-22T20:12:53.000300Z

I can definitely make a test for it by only looking at the replica. When you strip away all of the messaging/concurrency code, these bugs are super straight forward to reproduce and observe

michaeldrogalis 2018-01-22T20:13:03.000634Z

Fixing is sometimes hard because scheduling is just a tough subject, but this sounds plain broken

michaeldrogalis 2018-01-22T20:13:40.000521Z

Ill investigate tonight

ninja 2018-01-22T20:24:48.000199Z

Thx for the insight - might come in handy in the future. Appreciate your effort 👍:skin-tone-2:

michaeldrogalis 2018-01-22T20:32:03.000525Z

Anytime!

souenzzo 2018-01-22T20:45:46.000087Z

Anyone using (or planning) onyx-datomic with #datomic cloud? I see that https://github.com/onyx-platform/onyx-datomic/blob/0.12.x/src/onyx/plugin/datomic.clj is almost compatible with Client API L41 the use of d/ident can turn into d/pull L142 on client API, d/tx-range receives conn, not log. L5 sould require datomic.client.api, not datomic.api 😛

michaeldrogalis 2018-01-22T21:32:57.000165Z

@souenzzo It sounds like with the exception of L142, we can make changes to support both?

souenzzo 2018-01-22T21:43:21.000767Z

@michaeldrogalis not sure how (different build params/artifacts, runtime arg). I will investigate.

michaeldrogalis 2018-01-22T21:44:45.000202Z

Cool, thanks. I'd love to support both. Datomic Cloud looks wonderful.

👍 1
💵 1