Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Repository cleanup on shutdown

I frequently have this problem when using jgit in a command line tool as well -- an unluckily timed ctrl-C from the user can leave them in a very unhappy state.

I imagine it can also happen when another git process is legitimately in progress on the repo. Is there a reliable way to disambiguate these two? Perhaps even set a patience level (say, wait up to 500ms before throwing a lock exception)?


Derelle Redmond <Derelle.Redmond@xxxxxxxxxxxxxx> wrote:

Hello,

 

I have encountered an issue where a sudden shutdown of the web application server is causing jgit to leave behind the /.git/index.lock file. If I have two instances of a jgit repository, is there an simple way to check if one instance of a jgit repository is in the middle of a checkout process if both instances point to the same git repository? I believe the best solution is to implement a servletcontext destroyed method that checks for the lock file, but I was wondering if JGit already provides a method to do this more efficiently.

 

Thanks,

 

Derelle Redmond, Associate Software Engineer

M  248.905.1334   

One ePrize Drive, Pleasant Ridge, MI 48069

-------------------------------------------------------

HELLOWORLD.com

[You used to know us as ePrize.]

 



jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jgit-dev

Back to the top