-
Notifications
You must be signed in to change notification settings - Fork 41
Fix to increase the maximum allowed string length with Object Storage #3248
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: master
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @KodaiD, 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 the Object Storage adapter failed to retrieve records containing large data due to strict string length constraints in the Jackson JSON serializer. By significantly increasing this limit and introducing a proactive validation step during data writes, the system can now reliably handle and store larger data payloads, preventing potential read failures and ensuring data integrity. Highlights
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
|
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 successfully addresses the issue of handling large data in the Object Storage adapter by increasing Jackson's stream read constraints and adding corresponding write-side validation. The changes are logical and well-tested with both unit and integration tests. I have a few suggestions to improve the robustness and performance of the implementation. My main feedback is to replace assert statements with explicit null checks to prevent potential NullPointerExceptions at runtime. Additionally, I've suggested an optimization for an integration test to improve its performance when handling large data.
core/src/main/java/com/scalar/db/storage/objectstorage/ObjectStorageOperationChecker.java
Show resolved
Hide resolved
core/src/main/java/com/scalar/db/storage/objectstorage/ObjectStorageOperationChecker.java
Show resolved
Hide resolved
integration-test/src/main/java/com/scalar/db/api/DistributedStorageIntegrationTestBase.java
Outdated
Show resolved
Hide resolved
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Description
This PR fixes the JSON serializer to increase Jackson stream read constraints, enabling the handling of large data in Object Storage adapter.
Currently, when storing a record with large data (e.g., 100MiB), Object Storage adapter fails to get the record due to the following error:
To allow handling of large data, the PR increases the maximum allowed string length in Jackson's stream read constraints. Also, the validation that checks if the string length exceeds the maximum allowed length or not is added to the write side to prevent storing data that cannot be read back.
Related issues and/or PRs
N/A
Changes made
Checklist
Additional notes (optional)
N/A
Release notes
Fix to increase the maximum allowed string length with Object Storage.