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

With ReplicatedMap there's still a Memory leak in SecondsBasedEntryTaskScheduler #13409

Closed
mattmabyre opened this issue Jul 5, 2018 · 11 comments
Closed

Comments

@mattmabyre
Copy link

@mattmabyre mattmabyre commented Jul 5, 2018

Like this old post: #2343, i am facing the same problem. When i use a ReplicatedMap with the 3.9.3 version (I tried the 3.10.2 it's the same), i set a TTL when i put an entry into my replicated map. But when i clear the map, the heap still contains a lot of instances of SecondsBasedEntryTaskScheduler (~3 Go). Any tips to make it work with ReplicatedMap ? Thanks in advance.

@ahmetmircik ahmetmircik added this to the 3.10.3 milestone Jul 5, 2018
@ahmetmircik
Copy link
Member

@ahmetmircik ahmetmircik commented Jul 5, 2018

@mattmabyre this indeed seems a defect, i can verify by testing, thanks for the report.

@ahmetmircik
Copy link
Member

@ahmetmircik ahmetmircik commented Jul 5, 2018

Simple reproducer:

@Test(timeout = 1000 * 60 * 60)
public void oome_on_put_clear() {
    HazelcastInstance node = createHazelcastInstance();
    ReplicatedMap replicatedMap = node.getReplicatedMap("test");

    byte[] key = new byte[1024];
    byte[] value = new byte[2 * 1024];

    Random random = new Random();
    random.nextBytes(key);
    random.nextBytes(value);

    while (true) {
        for (int j = 0; j < 1000; j++) {
            replicatedMap.put(key, value, 100, TimeUnit.DAYS);
        }
        replicatedMap.clear();
    }
}
@mattmabyre
Copy link
Author

@mattmabyre mattmabyre commented Jul 5, 2018

You're welcome. Keep me updated when a fix will be available.

@mattmabyre
Copy link
Author

@mattmabyre mattmabyre commented Jul 6, 2018

Hello @ahmetmircik, I observed the same behaviour when i did a simple remove from my ReplicatedMap: entry is well deleted from map but not the related SecondsBasedEntryTaskScheduler instance. So there are two problems: both with the clear & remove methods.
Regards

@ahmetmircik
Copy link
Member

@ahmetmircik ahmetmircik commented Jul 6, 2018

@mattmabyre will also send a fix for remove case.

@mattmabyre
Copy link
Author

@mattmabyre mattmabyre commented Jul 6, 2018

@ahmetmircik Thanks !

@mattmabyre
Copy link
Author

@mattmabyre mattmabyre commented Jul 9, 2018

@ahmetmircik which version should i take now ?

@ahmetmircik ahmetmircik reopened this Jul 9, 2018
@ahmetmircik
Copy link
Member

@ahmetmircik ahmetmircik commented Jul 9, 2018

@mattmabyre If all fixes are reviewed before 3.10.3 release-branch-creation, we can put the fixes into 3.10.3, otherwise 3.10.4 or 3.11 will be the fixed versions.

@mattmabyre
Copy link
Author

@mattmabyre mattmabyre commented Jul 9, 2018

ok thanks for the info

@ahmetmircik ahmetmircik self-assigned this Jul 9, 2018
@ahmetmircik
Copy link
Member

@ahmetmircik ahmetmircik commented Jul 9, 2018

closing this issue, fixes will be in 3.10.3 release which most probably will be released in one or two weeks time period.

@mattmabyre
Copy link
Author

@mattmabyre mattmabyre commented Jul 9, 2018

yes perfect ! thanks for your reactivity !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.