github-actions[bot] commented on code in PR #65052:
URL: https://github.com/apache/doris/pull/65052#discussion_r3507684028


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Resource.java:
##########
@@ -266,9 +269,60 @@ public void write(DataOutput out) throws IOException {
 
     public static Resource read(DataInput in) throws IOException {
         String json = Text.readString(in);
+        json = addLegacyClazzIfMissing(json);

Review Comment:
   This compatibility repair only runs for standalone `Resource.read()` 
entries, so it fixes journal replay but not old images. The `resources` image 
module goes through `Env.loadResources()` -> `ResourceMgr.read()`, and 
`ResourceMgr.read()` still deserializes the whole manager directly with 
`GsonUtils.GSON.fromJson(json, ResourceMgr.class)`. For a legacy image payload 
like 
`{"nameToResource":{"r":{"name":"r","type":"AZURE","references":{},"id":1,"version":0}}}`,
 the nested `Resource` value never reaches this shim; it goes straight to 
`RuntimeTypeAdapterFactory.read()`, which still throws when `clazz` is absent. 
Please apply the same discriminator repair to resources nested in 
`ResourceMgr.read()` (or move it into the `Resource` Gson adapter/deserializer) 
and add an image-shaped `ResourceMgr` compatibility test, otherwise clusters 
whose latest image contains one of these legacy Azure resources can still fail 
before edit-log replay reaches the fixed path.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to