-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added DuplicateWindow to NatsKVConfig #440
Conversation
this might potentially be a contentious change and not inline with the spec. @ripienaar is this acceptable? |
Vid here, show the TTL. https://youtu.be/XLJ5_5MsgGQ?t=1763 , But using just using MaxAge in the .net v2, causes the following : |
Duplicate window should == MaxAge when MaxAge is below 2 minutes. |
…nt to automatically reduce the duplicate window
thanks @ripienaar So, it looks like we just need to implement the validation but there is not reason why you can't make the duplicate window configurable. OK just realised we did have a related change in #362. Just merged that, so you need to fix conflicts, sorry about that. |
Have mimicked the Go Client. Go client options don't allow you to configure the duplicate window. It just sets duplicate window to max age if max age is < 2 mins.... |
@darkwatchuk I thought you also wanted to make duplicate window configurable, no? edit: if not this was already fixed in #362 (just merged) |
I'd prefer not to make it configurable - we dont want to over expose stream internals |
No. I just needed a MaxAge < 2 mins. The only way to do this was reduce the window. Am happy with the Go client implementation of auto setting both to be the same. |
Ok - fine if just merged. I'll close this. |
sorry about the confusion. thanks @darkwatchuk |
The DuplicateWindow TimeSpan needs to be exposed for KVStores in order to facilitate certain patterns like leader election within a reasonable time period. Currently it's fixed at 2 minutes, so you can't reduce MaxAge to less than this.
This PR just exposes DuplicateWindow via NatsKVConfig as an optional parameter with the default left at the current 2 minutes.