Repository navigation
fix(backend): keep one idempotency cleanup timer across reloads - #2047
Open
woahwhattheheck wants to merge 1 commit into
Open
woahwhattheheck wants to merge 1 commit into
woahwhattheheck wants to merge 1 commit into
Conversation
|
@woahwhattheheck is attempting to deploy a commit to the 1nonly's projects Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Closes #1942.
The module-local timer guard is reset by hot reload and
vi.resetModules(), so repeated imports create extra cleanup intervals and separate in-memory stores. This keeps the store and cleanup handle in one namespaced global state. Any retainedclearCleanupInterval()export clears the active timer; a later import may restart one timer. Node timers are unreferenced, while numeric browser handles and timer shims remain supported.Only the cleanup lifecycle and its focused regression file change. Record fields, TTL behavior and service methods are preserved.
Validation for these unchanged source/test postimages:
The two published files match the tested blobs exactly: production
4f116f46a536ce09afc640b094c1f19684dddce1, tests85d4012714e93b7a3dc7fdbdc8d7f6ae33e08c9d. Head7647ffd83a8a4945ff7424b059af3ece78003058is one commit ahead of current upstream master0d847032ef5862806cbb678f0bca93b6be44fb17.Current project verification also passes all 39 cases on these exact published blobs under Node20.20.2, pnpm9.0.0 and Vitest2.1.9 with the unchanged project configuration/setup and default jsdom29.1.1 environment. V8 whole-module coverage is84.76% statements/lines,100% branches and78.57% functions; the unchanged getdel/incr/expire methods remain outside this focused selection.
Dependency installation exposed an existing base inconsistency: package.json lists Prettier^3.9.6 but pnpm-lock.yaml omits it. For the local focused run only, that unlisted devDependency was temporarily omitted to install the exact existing lock with scripts disabled; package.json was restored before tests. No source or dependency changes were made for validation. Full build/typecheck and hosted upstream CI are not claimed.