{"push_id":1177247519,"size":4,"distinct_size":4,"ref":"refs/heads/master","head":"ea65e9bff174466f2242517ec01b4ac3486868fc","before":"d9ee9613093a52934326847ea9c712c0a9838d08","commits":[{"sha":"15ca7b0bcb8782a9d493e3abb8df669c59debfd6","author":{"name":"Edwin Kempin","email":"09dea6af173b9d87c3598437a9d65c7b6656a11e@google.com"},"message":"Migrate reviewed flags to local H2 database\n\nWith NoteDb Gerrit will no longer have a database. Hence all data from\nReviewDb must be migrated away from it. This change migrates the\nreviewed flags from ReviewDb to a local H2 database.\n\nReviewed flags are tuples of (patch set ID, file, account ID) and\nrecord whether a user has reviewed a file in a patch set. Each user\ncan easily have thousands of reviewed flags and the number of reviewed\nflags is growing without bound.\n\nMost data from ReviewDb is migrated to be stored in git, but for\nreviewed flags a git-based storage is not very well suitable because\nthere is a relatively high write latency [1]. Also depending on the\nexact storage format updating reviewed flags may create a huge git\nhistory which is not good for anything since an audit log for reviewed\nflags is not needed [1].\n\nSince reviewed flags are small per-user bits that are quickly read and\nupdated a database seems to be the best storage [2]. This is why with\nthis change the reviewed flags will be stored in a local H2 database.\nThis store implements the AccountPatchReviewStore extension point that\nwas added by change Iaaacd9f0a. Plugins can implement this extension\npoint and replace the local H2 database with another storage.\n\nTo support multi-master the local H2 database must be replaced by a\nstorage that supports replication, e.g. a MySQL replication system\n[2]. This can be done by implementing the AccountPatchReviewStore\nextension point.\n\nA schema migration copies all reviewed flags from ReviewDb to the\nlocal H2 database and the old ACCOUNT_PATCH_REVIEWS table in ReviewDb\nis dropped.\n\nNot using gwtorm to access the local H2 database is intentional. When\nReviewDb is gone, we want to drop the dependency to gwtorm, and hence\nwe don't want to introduce any new dependencies to it. Instead the\nimplementation is using raw SQL.\n\nThe local H2 database is stored in the review site in:\n  $site_path/db/account_patch_reviews.h2.db\n\nFor the acceptence tests an in memory H2 database is used.\n\n[1] https://groups.google.com/d/msg/repo-discuss/KhXKMKTJNMs/Tq3XaB8wCgAJ\n[2] https://groups.google.com/d/msg/repo-discuss/KhXKMKTJNMs/hHoCa1_5CwAJ\n\nChange-Id: I7cb77ff124e36709cc69ef547f2b4e5e1a1d7f62\nSigned-off-by: Edwin Kempin <ekempin@google.com>","distinct":true,"url":"https://api.github.com/repos/GerritCodeReview/gerrit/commits/15ca7b0bcb8782a9d493e3abb8df669c59debfd6"},{"sha":"d7d82fe35027fe8d82b90fff9a3b57316db52ef3","author":{"name":"Edwin Kempin","email":"09dea6af173b9d87c3598437a9d65c7b6656a11e@google.com"},"message":"LuceneAccountIndex: Return results from read method\n\nChange-Id: I77b20e9fcf66e5541f08711be1faca8c3891d9c2\nSigned-off-by: Edwin Kempin <ekempin@google.com>","distinct":true,"url":"https://api.github.com/repos/GerritCodeReview/gerrit/commits/d7d82fe35027fe8d82b90fff9a3b57316db52ef3"},{"sha":"3a9284b9a22dd06156bbc01a2fdfa8842dd1875e","author":{"name":"Edwin Kempin","email":"09dea6af173b9d87c3598437a9d65c7b6656a11e@google.com"},"message":"Merge \"LuceneAccountIndex: Return results from read method\"","distinct":true,"url":"https://api.github.com/repos/GerritCodeReview/gerrit/commits/3a9284b9a22dd06156bbc01a2fdfa8842dd1875e"},{"sha":"ea65e9bff174466f2242517ec01b4ac3486868fc","author":{"name":"Edwin Kempin","email":"09dea6af173b9d87c3598437a9d65c7b6656a11e@google.com"},"message":"Merge \"Migrate reviewed flags to local H2 database\"","distinct":true,"url":"https://api.github.com/repos/GerritCodeReview/gerrit/commits/ea65e9bff174466f2242517ec01b4ac3486868fc"}]}
{"actor":{"display_login":"lucamilanesio"}}