-
-
Notifications
You must be signed in to change notification settings - Fork 522
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
Fix: Restoring lucene index build during startup & allow rebuild through UI #2200
Fix: Restoring lucene index build during startup & allow rebuild through UI #2200
Conversation
CPE(Cpe.class), | ||
VULNERABLESOFTWARE(VulnerableSoftware.class); | ||
|
||
private Class<?> clazz; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ImmutableEnumChecker: enums should be immutable: 'IndexType' has non-final field 'clazz'
private Class<?> clazz; | |
private final Class<?> clazz; |
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
790b845
to
7b5b1cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @syalioune! 🚀
A few suggestions and nitpicks 😛
src/main/java/org/dependencytrack/model/ConfigPropertyConstants.java
Outdated
Show resolved
Hide resolved
src/main/java/org/dependencytrack/resources/v1/SearchResource.java
Outdated
Show resolved
Hide resolved
@syalioune Please rebase with |
…d listener A REST API is also exposed to allow index rebuild through the GUI. See DependencyTrack#2104 Automatic periodic consistency check with database are performed if enabled Signed-off-by: Alioune SY <sy_alioune@yahoo.fr>
…d listener Takint into account review comments Signed-off-by: Alioune SY <sy_alioune@yahoo.fr>
880cbb6
to
e798ba7
Compare
…d listener Fixing unit tests. Signed-off-by: Alioune SY <sy_alioune@yahoo.fr>
checkIndex.close(); | ||
} | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally: If you return or throw from a finally, then values returned or thrown from the try-catch block will be ignored. Consider using try-with-resources instead.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for yet again a stellar PR @syalioune! 🙌
…dencyTrack#2200) * Fix: Restoring lucene index build during startup by having a dedicated listener A REST API is also exposed to allow index rebuild through the GUI. See DependencyTrack#2104 Automatic periodic consistency check with database are performed if enabled Signed-off-by: Alioune SY <sy_alioune@yahoo.fr> * Fix: Restoring lucene index build during startup by having a dedicated listener Takint into account review comments Signed-off-by: Alioune SY <sy_alioune@yahoo.fr> * Fix: Restoring lucene index build during startup by having a dedicated listener Fixing unit tests. Signed-off-by: Alioune SY <sy_alioune@yahoo.fr> Signed-off-by: Alioune SY <sy_alioune@yahoo.fr> Fixes DependencyTrack#2104 Signed-off-by: mulder999 <nospam099-github@yahoo.com>
Description
Fix : Restoring lucene index build during startup by having a dedicated listener
The following features/fixes are introduced as part of this PR
CorruptIndexException
will trigger a rebuild of the corresponding index#2235 is created to reduce as much as possible delta between DB and lucene that feature 2 above mitigate.
Addressed Issue
#2104
Additional Details
Related frontend PR DependencyTrack/frontend#338
Checklist
- [ ] This PR introduces changes to the database model, and I have added corresponding update logic- [ ] This PR introduces new or alters existing behavior, and I have updated the documentation accordingly