Bug Summary
setTTLExpiration({ eviction: N }) produces NaN cleanupInterval, eviction scanner never starts
Reproduction Repository (if applicable)
https://github.com/HarperFast/harper-qe-logbook/tree/main/v4-to-v5/upgrade-test-component
Steps to Reproduce
(local reproduction steps, not related to the component posted above, but same mechanism)
- Define a table with
@table(database: "demo", eviction: 5) (no expiration: field), or call Table.setTTLExpiration({ eviction: 5 }) directly
- Write a record:
Table.put('a', {}, { expiresAt: Date.now() + 100 })
- Wait 200ms
Table.primaryStore.getSync('a'), record still present
describe_all shows "expiration": "NaNs" on the table
Expected Behavior
Records evict after their expiresAt. describe_all shows "expiration" in seconds.
Actual Behavior
Records persist indefinitely. describe_all shows the literal string "NaNs".
Platform
Harper 4.5.x — 5.x
Console Errors
N/A
Screenshots or Videos
No response
Additional Context
Visible in describe_all:
"sem.PageCache": { "expiration": "NaNs", "sources": ["SemPageCacheSource"] }
"seo.PageCache": { "expiration": "NaNs", "sources": ["SeoPageCacheSource"] }
Are you planning to fix this issue?
Yes, I'll submit a PR to fix this
Bug Summary
setTTLExpiration({ eviction: N })producesNaN cleanupInterval, eviction scanner never startsReproduction Repository (if applicable)
https://github.com/HarperFast/harper-qe-logbook/tree/main/v4-to-v5/upgrade-test-component
Steps to Reproduce
(local reproduction steps, not related to the component posted above, but same mechanism)
@table(database: "demo", eviction: 5)(noexpiration:field), or callTable.setTTLExpiration({ eviction: 5 })directlyTable.put('a', {}, { expiresAt: Date.now() + 100 })Table.primaryStore.getSync('a'), record still presentdescribe_allshows"expiration": "NaNs"on the tableExpected Behavior
Records evict after their
expiresAt.describe_allshows"expiration"in seconds.Actual Behavior
Records persist indefinitely.
describe_allshows the literal string"NaNs".Platform
Harper 4.5.x — 5.x
Console Errors
N/A
Screenshots or Videos
No response
Additional Context
Visible in
describe_all:Are you planning to fix this issue?
Yes, I'll submit a PR to fix this