Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tickets in deleted repository still exist #764

Closed
gitblit opened this issue Aug 12, 2015 · 6 comments
Closed

Tickets in deleted repository still exist #764

gitblit opened this issue Aug 12, 2015 · 6 comments

Comments

@gitblit
Copy link
Collaborator

gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 468

What steps will reproduce the problem?
1. Configure GitBlit to use the FileTicketService ticket service.
2. Create a new repository.
3. Create a ticket (or two) in the repository.
4. (Optional) Assign the user as the owner of the tickets.
5. Delete the repository.

What is the expected output? What do you see instead?
I expected the tickets to be deleted with the repository, instead the tickets are still
around and show up in the "my tickets" page and, if the repository is created with
the same name, back in the repository ticket list. Clicking on any of the ticket links
will either error or take you to the ticket list of the repository (if it was recreated).


What version of the product are you using? On what operating system?
Windows 7, JDK 7u55, GitBlit 1.6.0 WAR, Tomcat 64-bit 7.0.54


Please provide any additional information below.
Occasionally the 'my tickets' list will report an internal error. Here's the stack
trace recorded:

2014-07-18 13:31:42 [ERROR] Error attaching this container for rendering: [MarkupContainer
[Component id = ticketList]]
org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering:
[MarkupContainer [Component id = ticketList]]
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1789)
    at org.apache.wicket.Component.onBeforeRender(Component.java:4001)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:1069)
    at org.apache.wicket.Component.beforeRender(Component.java:1103)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1777)
    at org.apache.wicket.Component.onBeforeRender(Component.java:4001)
    at org.apache.wicket.Page.onBeforeRender(Page.java:1555)
    at com.gitblit.wicket.pages.BasePage.onBeforeRender(BasePage.java:142)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:1069)
    at org.apache.wicket.Component.beforeRender(Component.java:1103)
    at org.apache.wicket.Component.prepareForRender(Component.java:2297)
    at org.apache.wicket.Page.prepareForRender(Page.java:1545)
    at org.apache.wicket.Component.prepareForRender(Component.java:2329)
    at org.apache.wicket.Page.renderPage(Page.java:912)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
    at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
    at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1287)
    at org.apache.wicket.RequestCycle.step(RequestCycle.java:1358)
    at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465)
    at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
    at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
    at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at com.gitblit.servlet.EnforceAuthenticationFilter.doFilter(EnforceAuthenticationFilter.java:87)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at com.gitblit.servlet.ProxyFilter$1.doFilter(ProxyFilter.java:74)
    at com.gitblit.servlet.ProxyFilter.doFilter(ProxyFilter.java:67)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at com.gitblit.wicket.panels.TicketListPanel$1.populateItem(TicketListPanel.java:71)
    at org.apache.wicket.markup.repeater.RefreshingView$1.newItem(RefreshingView.java:114)
    at org.apache.wicket.markup.repeater.DefaultItemReuseStrategy$1.next(DefaultItemReuseStrategy.java:71)
    at org.apache.wicket.markup.repeater.DefaultItemReuseStrategy$1.next(DefaultItemReuseStrategy.java:68)
    at org.apache.wicket.markup.repeater.RefreshingView.addItems(RefreshingView.java:189)
    at org.apache.wicket.markup.repeater.RefreshingView.onPopulate(RefreshingView.java:98)
    at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:131)
    at org.apache.wicket.markup.repeater.AbstractPageableView.onBeforeRender(AbstractPageableView.java:121)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:1069)
    at org.apache.wicket.Component.beforeRender(Component.java:1103)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1777)
    ... 45 more

Reported by gibwar on 2014-07-18 19:35:25

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Wow, you are really exercising Gitblit!

The tickets really are deleted.  For the FileTicketService they exist as files in the
repo dir.  Deleting the repo recursively destroys everything, including the ticket
files.  BUT.  All tickets are indexed with Lucene.  All queries are executed against
the Lucene index.  This allows multiple persistence engines to be implemented without
designing a new query system for each one.  The Lucene index *should* be purged of
those tickets when you delete the repo, but evidently you have found a case where this
is not true.

What you are seeing are shadows of your deleted tickets.  They are built from the pieces
stored in the Lucene index.  Just enough data is indexed to populate the query pages
- but these are not really the tickets.  That is why when you drill into the page you
throw exceptions; you are trying to retrieve & display a ticket which does not exist.

So the problem is: the Lucene ticket index is not being correctly purged on repository
deletion when using the FileTicketService.

Reported by James.Moger on 2014-08-12 19:13:25

  • Status changed: Accepted
  • Labels added: Milestone-1.6.1

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

I forgot to follow up on this earlier but I did manage to clear Lucene's cache following
the directions you have provided at http://gitblit.com/tickets_replication.html. It
did clear up the tickets and fix the crash on the "My Tickets" page.

Reported by gibwar on 2014-08-18 15:52:02

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

The NPE fix has been pushed.  But like I mentioned before, the real problem is that
the index was not properly purged on repository deletion.

Did you delete the repo with Gitblit or did you manually delete the repo?

Reported by James.Moger on 2014-09-08 20:57:48

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

  > Did you delete the repo with Gitblit or did you manually delete the repo?

I deleted the repository through the GitBlit interface. After I first discovered the
problem I then tried multiple ways of deleting it and recovering it but the problem
remained until I found the clear cache command.

Reported by gibwar on 2014-09-08 21:17:15

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Found the bug. Fix pushed to master.

Reported by James.Moger on 2014-09-08 22:08:59

  • Status changed: Queued

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

v1.6.1 released

Reported by James.Moger on 2014-10-20 21:36:03

  • Status changed: Done

@gitblit gitblit closed this as completed Aug 12, 2015
@flaix flaix modified the milestone: 1.6.1 Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants