-
Notifications
You must be signed in to change notification settings - Fork 74
MLE-26460 Preventing maxDocToUriBatchRatio value of -1 #1876
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
Conversation
|
Copyright Validation Results ✅ Valid Files
✅ All files have valid copyright headers! |
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.
Pull request overview
This PR addresses a server-side bug where maxDocToUriBatchRatio returns -1 when the number of server threads is less than the number of forests, preventing a LinkedBlockingQueue construction error due to negative capacity.
- Added validation to default
maxDocToUriBatchRatioto 1 when the server returns a value ≤ 0 - Created a comprehensive test to verify the fix by simulating the condition where server threads are fewer than forests
- Added utility methods in test infrastructure to support server configuration changes during testing
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| marklogic-client-api/src/main/java/com/marklogic/client/datamovement/impl/DataMovementServices.java | Added validation to prevent negative maxDocToUriBatchRatio values by defaulting to 1 |
| marklogic-client-api/src/test/java/com/marklogic/client/datamovement/FewerServerThreadsThanForestsTest.java | Added test that reproduces the bug scenario by reducing server threads below forest count |
| marklogic-client-api/src/test/java/com/marklogic/client/test/Common.java | Added newAdminManager() utility method to support server configuration changes in tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| queryBatcher.awaitCompletion(); | ||
| dmm.stopJob(queryBatcher); | ||
|
|
||
| assertEquals(4, uriCount.get(), "Verifies that the 4 tet documents were found, and more importantly, " + |
Copilot
AI
Jan 5, 2026
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.
Corrected spelling of 'tet' to 'test'.
| assertEquals(4, uriCount.get(), "Verifies that the 4 tet documents were found, and more importantly, " + | |
| assertEquals(4, uriCount.get(), "Verifies that the 4 test documents were found, and more importantly, " + |
b863a60 to
3a27dff
Compare
No description provided.