chaokunyang commented on code in PR #1406:
URL: https://github.com/apache/incubator-fury/pull/1406#discussion_r1527468863
##########
java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java:
##########
@@ -391,12 +391,7 @@ private void registerDefaultClasses() {
/** register class. */
public void register(Class<?> cls) {
- if (!extRegistry.registeredClassIdMap.containsKey(cls)) {
- while
(extRegistry.registeredId2Classes.containsKey(extRegistry.registeredClassIdCounter))
{
- extRegistry.registeredClassIdCounter++;
- }
- register(cls, extRegistry.registeredClassIdCounter);
- }
+ register(cls, extRegistry.registeredClassIdCounter);
Review Comment:
Could you elabrate more the `ClassIdAllocator`?
I'm not sure how it handle such an situation: there are three libraries and
one client of three libraries. Every libraries has some classes to register,
but they can't assume the register order since they don't know which will be
registered first, so they use specified class id for such registration. If the
client has two versions, the first version use library1 and library2, and the
second version use library1 and library3. Then the registered ids in library2
should be left here, those ids shouldn't be used by library3. Will the
`ClassIdAllocator` handle such cases?
--
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]