Skip to content

Conversation

@emreyigit
Copy link
Collaborator

Implemented missing Map.UpdateTimeToLive API.

@emreyigit emreyigit added this to the 5.6.0 milestone Nov 5, 2025
@emreyigit emreyigit self-assigned this Nov 5, 2025
@emreyigit emreyigit added the Type: Enhancement Code enhancement. label Nov 5, 2025
@emreyigit emreyigit changed the title Implement UpdateTimeToLive Implement UpdateTimeToLive [HZ-5249][API-1789] Nov 5, 2025
@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.51%. Comparing base (331f3be) to head (d82abec).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #997      +/-   ##
==========================================
+ Coverage   81.46%   81.51%   +0.05%     
==========================================
  Files        1054     1054              
  Lines       25420    25427       +7     
==========================================
+ Hits        20709    20728      +19     
+ Misses       4711     4699      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@emreyigit emreyigit requested a review from ihsandemir November 5, 2025 12:26
@emreyigit emreyigit marked this pull request as ready for review November 5, 2025 12:26
@emreyigit emreyigit enabled auto-merge (squash) November 5, 2025 12:26
Assert.Less(elapsed, maxTTL * 1000);

// Close to min TTL
Assert.Less(elapsed, minTTL * 1000 * 2);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am not sure if this will always work if the server is working slow, etc.
Does the ContainsKeyAsync trigger eviction check on expiry, if so, it may be safe but if we do it on scheduled basis on the server side, there may be a time diff until that scheduler is triggered and entry is evicted. If that is the case, this check may fail depending on the scheduler interval.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, it may not work well in slow cases. Do you have any suggestion?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove that check :) By the way you normally do not need to introduce your own latch but we have assertTrueEventually kind of test utilities which would simply the test. Just check Java side. By the way, did we cover all the existing tests at the Java client for this API? If not, we can also add missing ones.

@ihsandemir ihsandemir added the Type: Feature Issue is a Feature Request. label Nov 7, 2025
@emreyigit emreyigit requested a review from ihsandemir November 7, 2025 09:03
@emreyigit emreyigit removed this from the 5.6.0 milestone Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement Code enhancement. Type: Feature Issue is a Feature Request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants