Bug 1045537 - Removing repository doesn't delete it from file system completely on Windows
Summary: Removing repository doesn't delete it from file system completely on Windows
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ER2
: 6.0.1
Assignee: Alexandre Porcelli
QA Contact: Jiri Locker
Depends On:
TreeView+ depends on / blocked
Reported: 2013-12-20 16:49 UTC by Jiri Locker
Modified: 2014-08-06 19:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Windows Server 2012 Windows 8
Last Closed: 2014-08-06 19:57:31 UTC
Type: Bug

Attachments (Terms of Use)
Exception stack trace (5.07 KB, text/plain)
2013-12-20 16:49 UTC, Jiri Locker
no flags Details

Description Jiri Locker 2013-12-20 16:49:23 UTC
Created attachment 839689 [details]
Exception stack trace

Description of problem:
When removing repository in UI or via REST it is not deleted from file system completely. UI reports no error, so it seems the operation completed successfully, but when it is invoked via REST it fails with exception. It seems that JGit fails to delete git .pack files.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. go to Administration in Workbench
2. clone a repository that has some Packfiles (http://git-scm.com/book/en/Git-Internals-Packfiles)
3. remove the repository

Actual results:
The repository root directory still exists in .niogit. It contains some .pack files and maybe some refs, too.

Expected results:
The removed repository directory should be removed completely.

Additional info:
To reproduce with REST from command line:
curl -u '<user:password>' -H 'Accept: application/json' -H 'Content-Type: application/json' -X DELETE http://localhost:8080/business-central/rest/repositories/my-repository

I wasn't able to successfully run this command in Cygwin, though. We use a Java REST client code in automated test suite.

Comment 1 Alexandre Porcelli 2014-01-02 17:46:46 UTC
Fix(*) pushed to master and product branch of UberFire repo:


* - I coudln't yet test on my computer as I'm still strugling to setup a windows VM, but I didn't wanna block others to have it in hands soon.

Comment 2 Jiri Locker 2014-01-23 15:24:38 UTC
Still broken in CR1. Removing a repository typically leaves a single Packfile in the repo directory.

Comment 3 Lukáš Petrovický 2014-01-23 17:06:14 UTC
The impact of this issue is that unless the repo is deleted completely, users won't be able to clone it again later.

Comment 4 Alexandre Porcelli 2014-02-27 21:01:32 UTC
This looks like a JGit issue, I managed to implement a workaround (just for windows):

(0.3.x) http://github.com/uberfire/uberfire/commit/59469a006
(master) http://github.com/uberfire/uberfire/commit/01e65ad60

Comment 5 Jiri Locker 2014-03-28 16:14:03 UTC
Cannot reproduce with 6.0.1.CR2.

Note You need to log in before you can comment on or make changes to this bug.