Fork me on GitHub
#onyx
<
2018-01-22
>
lucasbradstreet00:01:11

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

danielcompton01:01:25

@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

danielcompton01:01:59

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

niamu01:01:44

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

niamu01:01:42

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.

michaeldrogalis03:01:06

Much appreciated everyone.

lmergen07:01:47

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

lmergen07:01:05

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

lmergen07:01:53

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

ninja15:01:21

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.

michaeldrogalis15:01:44

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

niamu17:01:12

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?

gklijs18:01:08

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

niamu18:01:04

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

jasonbell18:01:19

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

michaeldrogalis18:01:26

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

lucasbradstreet18:01:10

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

michaeldrogalis19:01:03

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

ninja20:01:35

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

michaeldrogalis20:01:53

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

michaeldrogalis20:01:03

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

michaeldrogalis20:01:40

Ill investigate tonight

ninja20:01:48

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

souenzzo20:01:46

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 😛

michaeldrogalis21:01:57

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

souenzzo21:01:21

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

michaeldrogalis21:01:45

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