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

Map TTL is not working as documented #12144

Closed
zaidrziad opened this issue Jan 14, 2018 · 1 comment
Closed

Map TTL is not working as documented #12144

zaidrziad opened this issue Jan 14, 2018 · 1 comment

Comments

@zaidrziad
Copy link

@zaidrziad zaidrziad commented Jan 14, 2018

When put K,V with TTL and put the same entry without changing TTL is should be evicted
IMap documentation:

If you have previously set a TTL for the key, the TTL remains unchanged and the entry will
expire when the initial TTL has elapsed.

But the TTL reset.

@mmedenjak mmedenjak added this to the 3.10 milestone Jan 14, 2018
@taburet taburet added Team: Core and removed Team: Core labels Jan 22, 2018
@taburet taburet self-assigned this Jan 23, 2018
@Holmistr Holmistr added the DR3 label Feb 2, 2018
taburet added a commit that referenced this issue Feb 15, 2018
There were outdated warnings in IMap javadoc regarding expiration and
TTL behavior of mutating methods don't accepting TTL as a parameter.

1. Added the tests to verify the current behavior and to make sure we
won't silently break it in the future one more time.

2. Removed the warnings themselves.

3. Added javadoc describing the current TTL behavior.

Fixes: #12144
taburet added a commit to taburet/hazelcast that referenced this issue Feb 15, 2018
There were outdated warnings in IMap javadoc regarding expiration and
TTL behavior of mutating methods don't accepting TTL as a parameter.

1. Added the tests to verify the current behavior and to make sure we
won't silently break it in the future one more time.

2. Removed the warnings themselves.

3. Added javadoc describing the current TTL behavior.

Fixes: hazelcast#12144
taburet added a commit that referenced this issue Feb 15, 2018
There were outdated warnings in IMap javadoc regarding expiration and
TTL behavior of mutating methods don't accepting TTL as a parameter.

1. Added the tests to verify the current behavior and to make sure we
won't silently break it in the future one more time.

2. Removed the warnings themselves.

3. Added javadoc describing the current TTL behavior.

Fixes: #12144
@kirill133
Copy link

@kirill133 kirill133 commented Apr 17, 2018

Is it possible to make it optional with the current behavior as default?
For example add one more method put(K, V, boolean refreshTtl)

In some cases like http session TTL should be refreshed (TTL + update time).
But in some cases like aggregation TTL should NOT be refreshed (TTL + creation time)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants
You can’t perform that action at this time.