Archiva

Pre-configured repositories initially appear to be empty

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0.2
  • Fix Version/s: 1.1.2
  • Component/s: repository scanning
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Number of attachments :
    2

Description

If you pre-configure a populated repository, Archiva does not display the content immediately when you start the application.

I think it should scan and index the repositories on startup, or possibly on the 'first' startup (when the database and index are empty.)

  1. MRM-848.patch
    07/Aug/08 10:15 PM
    4 kB
    Gwen Harold Autencio
  2. MRM-848-modified.patch
    13/Aug/08 7:51 PM
    4 kB
    Gwen Harold Autencio

Activity

Hide
Brett Porter added a comment -

I'm concerned about throwing in a scan-on-startup due to the cost, and it's not trivial to detect whether a repository has already been scanned at that point of initialisation. Will take a closer look in a future version but I think this is minor.

Show
Brett Porter added a comment - I'm concerned about throwing in a scan-on-startup due to the cost, and it's not trivial to detect whether a repository has already been scanned at that point of initialisation. Will take a closer look in a future version but I think this is minor.
Hide
Gwen Harold Autencio added a comment -

Attached patch that will only scan repositories that are not scanned or that doesn't have .index folder in the repository during startup.

Show
Gwen Harold Autencio added a comment - Attached patch that will only scan repositories that are not scanned or that doesn't have .index folder in the repository during startup.
Hide
Maria Odea Ching added a comment -

Hi Gwen, thanks for the patch!

I took a quick look at it and it looks good to me Just one comment though, maybe we could check if a repository has already been scanned in a different way? I'm a little hesitant on relying on existence of the .index directory to see if the repo has already been scanned as the indexing consumer can be disabled. Wdyt?

Show
Maria Odea Ching added a comment - Hi Gwen, thanks for the patch! I took a quick look at it and it looks good to me Just one comment though, maybe we could check if a repository has already been scanned in a different way? I'm a little hesitant on relying on existence of the .index directory to see if the repo has already been scanned as the indexing consumer can be disabled. Wdyt?
Hide
Gwen Harold Autencio added a comment -

Yeah it will still scan repositories if the indexing consumer will be disabled.
I'll try a different way on checking the repository if it has been scanned or not.
Thanks

Show
Gwen Harold Autencio added a comment - Yeah it will still scan repositories if the indexing consumer will be disabled. I'll try a different way on checking the repository if it has been scanned or not. Thanks
Hide
Gwen Harold Autencio added a comment -

Here's another patch that checks if a repository has been scanned, by getting there ids and placing them in a list.
Thanks Miss Deng

Show
Gwen Harold Autencio added a comment - Here's another patch that checks if a repository has been scanned, by getting there ids and placing them in a list. Thanks Miss Deng
Hide
Maria Odea Ching added a comment -

Patch applied in trunk -r685789.

Additional changes made:

  • applied codestyle formatting
  • clear queuedRepos list when task scheduler is stopped

Thanks again for the patch Gwen!

Show
Maria Odea Ching added a comment - Patch applied in trunk -r685789. Additional changes made:
  • applied codestyle formatting
  • clear queuedRepos list when task scheduler is stopped
Thanks again for the patch Gwen!

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: