| commit | f2a5d4fcdeee7fb20e01dffa673b5cace544e87a | [log] [tgz] |
|---|---|---|
| author | Antonio Barone <syntonyze@gmail.com> | Mon Nov 25 17:26:04 2024 +0100 |
| committer | Antonio Barone <syntonyze@gmail.com> | Fri May 30 10:06:40 2025 +0000 |
| tree | 69e5e39e061529ca4b60511d231a8f4741df268d | |
| parent | db1de2bcf0d94d2c109e319fa05539c026d04777 [diff] |
Handle project deletion Handle the removal of a project with a soft-delete approach. Rather than executing a table scan that might be heavy from a latency and from a RCUs consumption prospective, we flag the existing items as obsolete by bumping up a project version refSpec in the form of `|project-name`, to which we associate the current version `version`. This way, deleting a project is just as simple as bumping up its version value. We then prepend the current version to the refSpec when looking up items, so that we can easily ignore obsolete entries. For example, if a project `foo` is deleted a new entry is created as such: | refPath | refValue | | |foo | 1 | If then a new project is created, new refSpecs will be prefixed with the new project version: | refPath | refValue | | |1/foo/refs/heads/master | 3355b5b8b73 | We selected the pipe symbol (|) as a prefix because it is prohibited in repository names, ensuring no ambiguity arises with actual repository names. Change-Id: I2cfdf2e812c9e68735b66eef3b756ec6084bf697
This plugin provides an implementation of the Gerrit global ref-db backed by AWS DynamoDB.
Requirements for using this plugin are:
The global ref-db is a typical use-case of a Gerrit multi-master scenario in a multi-site setup. Refer to the Gerrit multi-site plugin for more details on the high level architecture.