Repository navigation
fix(common): introduce PERSISTENT_TTL_EXTEND_TO constant used by both TTL helpers - #918
Merged
chonilius merged 2 commits intoNov 21, 2026
Conversation
Replace the hardcoded 500_000 literal in extend_ttl_for_target with the new pub const PERSISTENT_TTL_EXTEND_TO: u32 = 500_000, which extend_ttl also now references. Tuning one constant now keeps both helpers in sync. Closes MergeFi#826 Closes MergeFi#824 Closes MergeFi#829 Closes MergeFi#825
|
@christianahtemitope2005 is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@christianahtemitope2005 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
extend_ttl_for_targethardcoded500_000as the minimumextend_tobaseline with a comment stating it "mirrors extend_ttl's own extend_to". Butextend_ttlalso hardcoded500_000as a separate literal, so changing one did not change the other — the invariant the comment claimed was not enforced by code (#826).Fix
Introduce
pub const PERSISTENT_TTL_EXTEND_TO: u32 = 500_000and use it in both helpers:extend_ttl:extend_ttl(key, 100_000, PERSISTENT_TTL_EXTEND_TO)extend_ttl_for_target:.max(PERSISTENT_TTL_EXTEND_TO as u64)Tuning this one constant now keeps both helpers in sync automatically.
Closes #826
Closes #824
Closes #829
Closes #825