>From Hussain Towaileb <[email protected]>:

Attention is currently required from: Michael Blow.

Hussain Towaileb has posted comments on this change by Hussain Towaileb. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20485?usp=email )

Change subject: [ASTERIXDB-3657][FAIL]: handle non-serializable exceptions
......................................................................


Patch Set 7:

(9 comments)

Commit Message:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20485/comment/1bcafbb2_d1954c88?usp=email
 :
PS5, Line 7: [ASTERIXDB-3657][FAIL]: handle non-serialize exceptions
> serializable*
Done


File 
asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplication.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20485/comment/25c5ebf4_a843612b?usp=email
 :
PS3, Line 165:         registerReplacement(BlobStorageException.class, o -> new 
SerializableExceptionProxy((Throwable) o));
> ```suggestion […]
Done


File 
hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/comm/ReplacementsAwareJavaSerializationProvider.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20485/comment/cd54559e_d324116a?usp=email
 :
PS5, Line 62:                     return e.getValue().apply(object);
> I would add object.getClass() to the map and point it to e. […]
Done


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20485/comment/31c7c2e3_5cb71a7b?usp=email
 :
PS5, Line 65:             return super.replaceObject(object);
> I would add object. […]
Done


File 
hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/JavaSerializationUtils.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20485/comment/ca140f23_b90d384b?usp=email
 :
PS2, Line 46:         try (ObjectOutputStream oos = 
serProvider.newObjectOutputStream(baos)) {
> it seems that the serProvider is the entity that should house this knowledge 
> about replacements, and […]
Done


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20485/comment/9f211b9b_bf937ee7?usp=email
 :
PS2, Line 40:     public static final Set<Class<? extends Throwable>> toProxy = 
new HashSet<>();
> this is not safe to have as a public set, it should probably also be thread 
> safe, as I'm not sure we […]
Done


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20485/comment/26616717_b8f1ef83?usp=email
 :
PS2, Line 163:             if (obj instanceof Throwable throwable && 
toProxy.contains(throwable.getClass())) {
> no need for `obj instanceof Throwable throwable` here, can just use 
> `toProxy.contains(obj. […]
Done


File 
hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/JavaSerializationUtils.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20485/comment/ebd3429c_9db514ab?usp=email
 :
PS3, Line 168:             Function<Object, Object> replacementFunction = 
replacements.get(object.getClass());
             :             if (replacementFunction != null) {
             :                 return replacementFunction.apply(object);
             :             }
             :             return super.replaceObject(object);
             :
> ```suggestion […]
Done


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20485/comment/20737461_bfa632a1?usp=email
 :
PS3, Line 180: Throwable
> as mentioned elsewhere, if you change this to Object, you can use the more 
> compact `SerializableExce […]
Done



--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20485?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: asterixdb
Gerrit-Branch: phoenix
Gerrit-Change-Id: I55e69623068a6c1759803cc699417021910237fd
Gerrit-Change-Number: 20485
Gerrit-PatchSet: 7
Gerrit-Owner: Hussain Towaileb <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Attention: Michael Blow <[email protected]>
Gerrit-Comment-Date: Wed, 15 Oct 2025 13:15:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Michael Blow <[email protected]>

Reply via email to