kserve / modelmesh

Distributed Model Serving Framework
Apache License 2.0
155 stars 64 forks source link

HashMap usage logic in `UpgradeTracker` #143

Open abrbird opened 5 months ago

abrbird commented 5 months ago

Does the logic in the UpgradeTracker class work correctly with the use of String[] as a key, or should a different key type be used, such as List<String>? As I know hashCode for String[] returns a value based on the object's reference rather than the array's content.

https://github.com/kserve/modelmesh/blob/af8c30042b319f323812fb3ac826bd5b96c2a061/src/main/java/com/ibm/watson/modelmesh/UpgradeTracker.java#L67

fsatka commented 2 months ago

anybody can answer on question, please)

spolti commented 2 months ago

@ckadner do you know this part of the code base?

spolti commented 2 months ago

I am not sure if it makes sense since it is a fixed hashmap. String[] is fine in this case. did you find any issue?