activerecord-cockroachdb-adapter icon indicating copy to clipboard operation
activerecord-cockroachdb-adapter copied to clipboard

Cockroach plans for ActiveRecord

Open sandstrom opened this issue 1 year ago • 4 comments

What are the Cockroach-teams plans for this repo?

It hasn't seen a release in almost a year, and some issues are left unanswered. Have you moved priorities elsewhere?

For someone evaluating a potential switch to CockroachDB, we'd like to understand:

  • What's your plan or roadmap for this adapter?
  • How many developers do you currently have working on this adapter?
  • What's your general plan for DB adapters? To maintain them yourself? Or rely on others to do the work for you?
  • What are some planned changes to the core DB engine, that are relevant for this adapter?

sandstrom avatar Mar 16 '23 09:03 sandstrom

For database tools we use a combination of in house expertise, work with project maintainers etc for ongoing support. For active record we have nightly tests in place that ensure DB related changes do not cause regressions in the adapter. We are working on sourcing someone well versed in Ruby and ActiveRecord to maintain this adapter going forward.

dikshant avatar Apr 11 '23 23:04 dikshant

@dikshant Sounds promising!

I think that's a great idea! With a senior Ruby developer dedicated to this adapter, you could really make it shine and make the overall integration flow for Rails applications (and others using ActiveRecord) much better.

For us right now, we've unfortunately put CockroachDB on hold due to some missing pieces in the adapter. I'll keep my eyes out for updates!

Have a great week! 💯

sandstrom avatar Apr 12 '23 08:04 sandstrom

@sandstrom any particular features you are looking for?

dikshant avatar Apr 12 '23 11:04 dikshant

  1. For async job processing via something called Good Job to work, we'd need advisory locks (https://github.com/cockroachdb/cockroach/issues/13546) and notify/listen (https://github.com/cockroachdb/cockroach/issues/41522).

Those are not related to the adapter though, it's a lack of functionality within CockroachDB proper.

More details: https://github.com/bensheldon/good_job/discussions/292#discussioncomment-5432002

  1. There was also an issue around rails migrations and transactions(?) with this adapter if I recall correctly, but I cannot find the issue or a description about it right now. Maybe it's solved (I don't have more than a few minutes to look for it at the moment).

  2. Second was a problem with compound keys in the schema config file in Rails, and how this couldn't be setup for a join table (N-N relationship) without having a surplus id column (a regular join table should only have table_a_id and table_b_id foreign key columns, but with this bug a third id column was required even though it didn't serve a purpose).

But this bug may also have been solved.

sandstrom avatar Apr 12 '23 14:04 sandstrom

@BuonOmo has been overseeing our adapter for quite some time now and it is still actively maintained. Closing this issue with that in mind.

dikshant avatar May 20 '24 14:05 dikshant