Skip to content
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

Memory leak in DescriptorQueryManager::cachedExpressionQueries when using HistoryPolicy #861

Open
wants to merge 1 commit into
base: 2.7
Choose a base branch
from

Conversation

aramashkan
Copy link

We using HistoryPolicy as below :

public class HistoryCustomizer implements DescriptorCustomizer {
    @Override
    public void customize(ClassDescriptor descriptor) throws Exception {
        HistoryPolicy policy = new HistoryPolicy();
        policy.addHistoryTableName(descriptor.getTables().get(0).getQualifiedName() + "_hist");
        if (descriptor.getTables().size() > 1) {
            policy.addHistoryTableName(descriptor.getTables().get(1).getQualifiedName() + "_hist");
        }
        policy.addStartFieldName("start_date");
        policy.addEndFieldName("end_date");
        policy.setShouldHandleWrites(true);

        descriptor.setHistoryPolicy(policy);
    }
}

After applying customizer keys contained in ConcurrentFixedCache's map will be changed. That's causing leak issue like below:
Screenshot 2020-07-22 at 17 27 18

…and unlimited grow.

Signed-off-by: Vladimir Konkov <vkonkov@citc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants