This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new 2ded0048952 [fix](fe) add compatible code for LocalTablet and
LocalReplica (#59771)
2ded0048952 is described below
commit 2ded00489527268e7cfa2faaaa1822c89429b885
Author: meiyi <[email protected]>
AuthorDate: Tue Jan 13 09:25:31 2026 +0800
[fix](fe) add compatible code for LocalTablet and LocalReplica (#59771)
### What problem does this PR solve?
https://github.com/apache/doris/pull/59327 introduces `LocalTablet`,
https://github.com/apache/doris/pull/59460 introduces `LocalReplica`.
These 2 pr will merge into 4.1.
This pr add compatible code for LocalTablet and LocalReplica to make 4.1
can downgrade to 4.0.
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
---
fe/fe-core/src/main/java/org/apache/doris/persist/gson/GsonUtils.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/persist/gson/GsonUtils.java
b/fe/fe-core/src/main/java/org/apache/doris/persist/gson/GsonUtils.java
index d863140a256..5d1802b603f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/persist/gson/GsonUtils.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/persist/gson/GsonUtils.java
@@ -528,7 +528,8 @@ public class GsonUtils {
.of(Replica.class, "clazz")
.registerDefaultSubtype(Replica.class)
.registerSubtype(Replica.class, Replica.class.getSimpleName())
- .registerSubtype(CloudReplica.class,
CloudReplica.class.getSimpleName());
+ .registerSubtype(CloudReplica.class,
CloudReplica.class.getSimpleName())
+ .registerCompatibleSubtype(Replica.class, "LocalReplica");
private static RuntimeTypeAdapterFactory<Tablet> tabletTypeAdapterFactory;
@@ -539,6 +540,7 @@ public class GsonUtils {
.registerSubtype(CloudTablet.class,
CloudTablet.class.getSimpleName());
if (Config.isNotCloudMode()) {
tabletTypeAdapterFactory.registerDefaultSubtype(Tablet.class);
+ tabletTypeAdapterFactory.registerCompatibleSubtype(Tablet.class,
"LocalTablet");
} else {
// compatible with old cloud code.
tabletTypeAdapterFactory.registerDefaultSubtype(CloudTablet.class);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]