Open larytet opened 5 years ago
LGTM, @cristaloleg what do you think?
To be honest, I'm out of context. But what I've understood from code LGTM
The patch is not intended to be a production code. I tried to explain what I am missing in the API. The production system could introduce a configuration flag and save quite a lot of memory and code.
Well, what I am missing in the API
sounds strange to me, 'cause there is no changes in the API (unless 1 comment?).
Basically you want to say, that we need explicitly check LifeWindow
to be non-negative.
I don't see any problems with such change, there is only 1 question about backward compatibility (will it be broken or not?)
The patch changes the API, the contract of what LifeWindow means. The patch breaks the backward compatibility for applications using large timeouts. I can imagine that some application could do something like
LifeWindow := 292*365*24*time.Hour
We might release v3 soon, with additional changes, so I think it's good to keep eye on this issue.
Thanks for sharing 😉
any chance to get this in v3 and also v3 release?
I think this is something which should make it into v3.
In the small scale, I don't see a difference, I think we'll see marginal performance improvements when working with millions of objects because we're not doing a double comparison.
Something like