-
-
Notifications
You must be signed in to change notification settings - Fork 90
fix tests #3408
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @robfrank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue where sequential index creation operations would fail with a NeedRetryException if background compaction was running. The fix implements a synchronous blocking mechanism, causing index creation to wait for ongoing asynchronous tasks to complete, thereby improving the reliability and predictability of index management without requiring manual retry logic from users. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Pull Request ReviewI've reviewed PR #3408 and have the following feedback: OverviewThis PR addresses Issue #2702 by changing the behavior when creating indexes while async processing (LSMTree compaction) is running. Instead of immediately throwing 🟢 Positives1. Code Quality
2. Test Coverage
3. Documentation
🟡 Concerns & Suggestions1. Thread Safety & Deadlock Risk
|
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.
Code Review
This pull request addresses an issue where creating multiple indexes sequentially could fail with a NeedRetryException. The fix, implemented in TypeIndexBuilder and ManualIndexBuilder, is to wait for any ongoing asynchronous tasks to complete instead of throwing an exception. This change improves the developer experience by removing the need for manual retry logic.
A new test class, Issue2702SequentialIndexCreationTest, has been added to verify the fix under conditions that would previously trigger the error, which is great.
Additionally, the LSMTreeFullTextIndex class has been refactored for better readability and maintainability, including the addition of Javadocs and the use of more modern Java constructs.
My review includes one suggestion regarding coding style in LSMTreeFullTextIndex.java to ensure long-term maintainability.
engine/src/main/java/com/arcadedb/index/fulltext/LSMTreeFullTextIndex.java
Show resolved
Hide resolved
🧪 CI InsightsHere's what we observed from your CI run for 2422c46. 🟢 All jobs passed!But CI Insights is watching 👀 |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3408 +/- ##
==========================================
+ Coverage 63.47% 63.57% +0.09%
==========================================
Files 1250 1251 +1
Lines 83379 83395 +16
Branches 16986 16991 +5
==========================================
+ Hits 52928 53018 +90
+ Misses 23179 23092 -87
- Partials 7272 7285 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| // Wait for any running async tasks (e.g., compaction) to complete before creating new index | ||
| // This prevents NeedRetryException when creating multiple indexes sequentially on large datasets | ||
| if (database.isAsyncProcessing()) |
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.
I think it should be
while (database.isAsyncProcessing())
database.async().waitCompletion();In case of concurrency?
| @@ -0,0 +1,163 @@ | |||
| # Issue #2702: NeedRetryException when creating indexes sequentially on large datasets | |||
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.
We don't need this file in the codebase
|
|
||
| // Wait for any running async tasks (e.g., compaction) to complete before creating new index | ||
| // This prevents NeedRetryException when creating multiple indexes sequentially on large datasets | ||
| if (database.isAsyncProcessing()) |
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.
I think it should be
while (database.isAsyncProcessing())
database.async().waitCompletion();In case of concurrency?
No description provided.