You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having an issue with Kryo producing a RuntimeException on occasion with the message "Parent scope can be set just once". The version of Kryo that we are using it 2.22.
I do understand that this can happen in a multi-threaded environment when reusing the Kryo instance, as it is not thread safe. However, I am using Apache commons-pool (PooledObjectFactory) to ensure that the Kryo instance is used by only a single thread at any given time. Because of the version of Kryo that we are using I don't have access to the Kryo Pool class, which is why I am using the Apache PooledObjectFactory.
Is there something that I must do to the Kryo instance when returning a given instance to the Pool to perform some sort of reset? I'm not setting autoReset on the Kryo instance so it should be set to true by default. I've verified the usage of the PooledObjectFactory to ensure that we borrow the instance from the ObjectPool to acquire the Kryo instance and that the instance is then returned to the ObjectPool when done, so I don't believe that there is any leakage pertaining to the usage.
We have also been receiving numerous ClassCastExceptions and some appearing just prior to the RuntimeException. I can reproduce the issue with a unit test but I think that they are related to #384, but I don't know if they could cause the RuntimeException (Parent scope can be set just once). I'm guessing not as I don't see a conclusive pattern between the two.
Any suggestions would be greatly appreciated.
Thanks...
The text was updated successfully, but these errors were encountered:
I'm having an issue with Kryo producing a RuntimeException on occasion with the message "Parent scope can be set just once". The version of Kryo that we are using it 2.22.
I do understand that this can happen in a multi-threaded environment when reusing the Kryo instance, as it is not thread safe. However, I am using Apache commons-pool (PooledObjectFactory) to ensure that the Kryo instance is used by only a single thread at any given time. Because of the version of Kryo that we are using I don't have access to the Kryo Pool class, which is why I am using the Apache PooledObjectFactory.
Is there something that I must do to the Kryo instance when returning a given instance to the Pool to perform some sort of reset? I'm not setting autoReset on the Kryo instance so it should be set to true by default. I've verified the usage of the PooledObjectFactory to ensure that we borrow the instance from the ObjectPool to acquire the Kryo instance and that the instance is then returned to the ObjectPool when done, so I don't believe that there is any leakage pertaining to the usage.
We have also been receiving numerous ClassCastExceptions and some appearing just prior to the RuntimeException. I can reproduce the issue with a unit test but I think that they are related to #384, but I don't know if they could cause the RuntimeException (Parent scope can be set just once). I'm guessing not as I don't see a conclusive pattern between the two.
Any suggestions would be greatly appreciated.
Thanks...
The text was updated successfully, but these errors were encountered: