I want to * use git mirror while master is down
So that I can stop master server for maintainance without disturbing git users (read access)
Side effect: reduce master load related to gitolite membership computation
Acceptance criteria
Add a REST route to fetch membership for a given list of users (potentially big: 1000 users for instance)
Add a caching mechanism for tuleap-gitolite-membership (redis)
for a user (john_doe), user groups are cached (eg: site_active, gpig_projectmembers, ug_103)
by default therer is a TTL for cache entry (configurable, default should be 10 mn)
Keep track of active users per mirror in redis too:
username
last access date
number of access
Add an "update-cache" option to tuleap-gitolite-membership
The will fetch the membership of all users identified as active users (previous step)
The entries are cached with configured TTL
The "update-cache" can be combined with a "without-expire" option
When used, entries are fetch as usual (for all active users)
But there is no expiration set
This is meant to be used when the master is planned to be down
Add a "disable-ttl" option to tuleap-gitolite-membership
This is the same purpose than "without-expire" but for emergencies (if master is unexpectedly down)
This invalidate the TTL and slave can continue to work until master is up again
Here is a schema of the proposed architecture (the elements in blue are the new ones)
CC list Nouha Terzi (terzino), Denis PILAT (denis_pilat), francois jean-marie (francoisjean-marie), Loïc Lefort (lefort)