Project

General

Profile

Improvement #2061

Remove pending JGit locks if found and lock access to Git repo of Git Component Repo with safe file lock

Added by Henning Blohm almost 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
z2-core
Target version:
Start date:
30.03.2020
Due date:
% Done:

0%

Estimated time:
origin:

Description

See https://www.eclipse.org/forums/index.php?t=msg&th=1102984&goto=1823307&#msg_1823307 for more details.

Currently JGit may leave blocking file locks when crashing. As that may prevent z2 from starting up, and as z2 is the only process that legitimately access the GitCR Git repo, we can
lock externally using a safe java.nio.channels.FileLock based mechanism.

Acceptance Criteria

  • Lock fetch on the git repo in the gitcr using LockingRevFile.
  • If finding a .git/index.lock at fetch time, delete it.

Related issues

Has duplicate z2-Environment - Bug #2073: Git locks may be left after crash and prevent update operation on z2 sync or startupResolved17.06.2020Henning Blohm

Actions

Also available in: Atom PDF