Page MenuHomePhabricator

Implement MySQL support
Open, Needs TriagePublic

Description

Imported from https://github.com/wikimedia/countervandalism-CVNBot/issues/17.

@Krinkle@github.com wrote on 10 June 2014:

Because SQLite really sucks at scale, especially the way CVNBot does it right now with the .NET/C-sharp implementation that essentially re-opens and re-closes a 30MB+ file on every query and thus for every packet received from recent changes feeds.

There is also a ton of complexity right now from the 25 CVNBot instances trying to sync their lists through a private "broadcast" IRC channel. This federation feature is cool and super useful when the bots run on different servers. But for many years now we've consolidated them all under Wikimedia Cloud so they can totally use a shared database instead. The broadcasting feature could then be turned off in our primary deployment.

DoctorWhooves@github.com wrote on 16 June 2014:

I find MySQL Connector/NET to be a good library for working with MySQL databases from the .NET environment.

@Krinkle wrote on 4 July 2020:

For local development we'd want to keep using SQLite for simplicity. So in addition to supporting MySQL, we'd need the same abstraction/interface to support SQLite as well.

In PHP, one such backend-agnostic interface exists in the form of PDO. I'm sure such libaries exist for C# as well, I just haven't had the time to reseach them and see what's needed to adopt them. Help always welcome!