I have a few issues with H2 as a production database for Gerrit,
related to management of the database:
* No easy way to backup H2 while Gerrit is running. To make a backup,
a Gerrit admin needs to login over SSH and use 'gerrit gsql' to
execute an H2 database backup command[1], which constructs a ZIP file
holding the backup data. Restoring this backup is probably somewhat
difficult, you need an H2 console to an empty database, but Gerrit
doesn't exactly come with one that will run without creating a
database first. So restoration isn't well planned. :-(
* No warm-spare configuration. Setting up a warm-spare server to keep
a reasonably current copy of the metadata improves reliability of the
entire installation. MySQL and PostgreSQL both have warm-spare (or
better master/master) configurations that are documented, and some
companies even sell support to your DBA team to help make these
systems really work. The H2 warm-spare configuration *might* work if
you custom-configure the JDBC connection options in gerrit.config, but
I've never tried this.
Given the limitations of H2 [2]. you won't run into issues with the
Gerrit metadata storage. 2+ years of metadata for the Google Android
team is still only a few hundred MiBs of data in the database. H2
scales up to 4 TB.
However the 2 billion rows/table limit might be an issue with
patch_set_approvals table. Assuming 2 reviewers per change and 4
patch sets before submission, with the default Code Review and
Verified categories, that is about 16 rows/change. That is only
125,000 changes before you bump into this limit in H2.
[1] http://www.h2database.com/html/grammar.html#backup
[2] http://www.h2database.com/html/advanced.html#limits_limitations
I'm not sure your maths is right here - I think you've confused million and billion. I make it 125,000,000 changes which by my calculations gives you enough changes to have 1000 developers making 34 changes a day for 10 years ... which should be plenty!
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postm...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
Uhm, yes. Thanks for that correction. :-)
I completely blame the bagel I was eating during breakfast while
drafting the above quoted email. It was large, and looked like a
zero. It used up 3 zeros from my estimate... :-)