-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
L2 cache does not support distributed server #5
Comments
In which case you look at classes The only other thing to note from the second stack trace is that when performing a query, depending on the query executed I would expect the candidate class of the query to be "initialised" at that point, in which case the class will be registered with the EnhancementHelper. You provide no definition of the query or class so no comment possible on that situation. Also note that current codebase (master) is where any proposed changes need to be, since that is what is developed. |
I think the reason is that it only uses objectid to get l2cache and do not check whether this 'class' has been registered or not. Here is what I found in the source: // ExecutionContextImpl.java
// ObjectProviderFactoryImpl.java
// StateManagerImpl.java
|
which doesnt explain what the query is being invoked, and why the candidate class is not "initialised" |
Here is the definition of the query from client. Any help to judge this question?
|
So why isn't the MRoleMap class initialised when it goes through the query compilation etc and before it gets to processing the query result? |
Do you mean the candidateClass in org.datanucleus.store.query.Query should be initialized after pm.newQuery? Maybe more traces have to be printed in |
I would expect the (Class)MetaData (annotations, XML) for the candidate class to be loaded, populated and initialised. The call to populate of the MetaData should call initialize on the class object, which should "register" it. You will see usage of "cmd" in the query objects, that is the MetaData for the candidate class. The log also tells you when metadata is loaded. |
Closing since no testcase provided, and no apparent willingness to develop a fix for whatever is being seen. Post back here with testcase and/or pull request as required and this can be reopened |
The problem is that the L2 cache using Ehcache plugin with distributed support does not work well (throws nothing found exception).
follow datanucleus/datanucleus-core#260 (comment)
The first app found pc is null and go to initialize a new class:
The second app found pc from cache and go to get that meta:
I agree with that L2 cache outlives the PMF because of distributed server in the background. I'm not sure this unsupported feature is relative to only Ehcache or not.
The text was updated successfully, but these errors were encountered: