Skip to content

Relax the updating of last_used_at of ssh keys when performing fetches.

When a user performs a git-operation through ssh using an SSH key, we update the last_used_at field in the database when gitlab-shell is calling /internal/allowed.

Since that endpoint is called multiple times during the single action (by GitLab-shell and Gitaly), it could end up being called multiple times a second.

I think we should ease this off a bit and move the actual update into sidekiq so the endpoint performs less writes and perhaps can rely only on secondaries.

Edited by Bob Van Landuyt