-
Notifications
You must be signed in to change notification settings - Fork 40
Add old method signatures of SchemaLoader's load(), unload() and repairAll() for backward compatibility
#2760
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
| } | ||
| } | ||
|
|
||
| // For backward compatibility with the old method signatures. |
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.
Copied these test cases from the original test code right before #2747 was merged.
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 restores the original SchemaLoader method signatures for load(), unload(), and repairAll() to maintain backward compatibility by forwarding calls to the newer overloads with a default false flag.
- Introduces public and private overloads without the
replicationTablesparameter. - Each added overload delegates to the corresponding new method with a
falsevalue for the extra flag. - Ensures existing client code using the old signatures continues to compile and run.
Comments suppressed due to low confidence (2)
schema-loader/src/main/java/com/scalar/db/schemaloader/SchemaLoader.java:640
- [nitpick] The parameter name
repairCoordinatorTableis singular but the other methods use plural (deleteCoordinatorTables/createCoordinatorTables); consider renaming torepairCoordinatorTablesfor consistency.
public static void repairAll(
schema-loader/src/main/java/com/scalar/db/schemaloader/SchemaLoader.java:456
- Add unit tests covering these new overloads to verify they correctly delegate to the new methods with default
falseflags.
// For backward compatibility.
| * @param options specific options for creating tables. | ||
| * @param createCoordinatorTables create coordinator tables or not. | ||
| * @throws SchemaLoaderException thrown when creating tables fails. | ||
| */ |
Copilot
AI
Jun 12, 2025
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.
These backward-compatibility overloads should be annotated with @deprecated to signal that they will be removed in a future release and guide users towards the new signatures.
| */ | |
| */ | |
| @Deprecated |
brfrn169
left a comment
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.
Left a few comments. Other than that, LGTM! Thank you!
| } | ||
| } | ||
|
|
||
| // For backward compatibility. |
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.
Maybe we don’t need this comment if we’re not planning to remove these methods in a future release. Or do we plan to?
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.
Addressed it in e7b6082
| } | ||
| } | ||
|
|
||
| // For backward compatibility with the old method signatures. |
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.
Ditto.
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.
Addressed it in e7b6082
feeblefakie
left a comment
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.
LGTM! Thank you!
Torch3333
left a comment
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.
LGTM, thank you!
…d `repairAll()` for backward compatibility (#2760)
Description
We supported
replicationTablesarguments inSchemaLoader'sload(),unload()andrepairAll()in #2747. The methods are public and it's possible existing users has used them. So, this PR adds the original method signatures for backward compatibility.Related issues and/or PRs
#2747
Changes made
Added the original method signatures that call corresponding the new method.
Checklist
Additional notes (optional)
None
Release notes
N/A