-
Notifications
You must be signed in to change notification settings - Fork 358
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
Pubsub: Update default settings; add maximum total lease extension #3920
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few niggles, but generally fine.
@@ -207,10 +218,15 @@ internal void Validate() | |||
public static TimeSpan MinimumAckExtensionWindow { get; } = TimeSpan.FromMilliseconds(50); | |||
|
|||
/// <summary> | |||
/// The default message ACKnowlegdment extension window of 15 seconds. | |||
/// The default message ACKnowlegdement extension window of 15 seconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still a typo here - gd instead of dg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, thanks. Done!
} | ||
} | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the method return at this point? Presumably it's just about feasible for _maxExtensionDuration to be one tick, so it could be disposed by the end of the block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the code here is setting up the max lease-extension deadline, so at this point it is correct to continue with sending the extension request to the server, and scheduling a further extension.
Comments added to clarify.
{ | ||
cts2 = _cts; | ||
} | ||
cts2?.Cancel(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this dispose as well? I'm a little lost as to what this is all doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Comments on this and Dispose would be useful.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading through everything else, it looks like it doesn't have to be disposed, but I suspect it would be good to do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Various comments added to try to clarify how this works.
{ | ||
// Ids have been added to _extendQueue, so trigger a push. | ||
_eventPush.Set(); | ||
// Some ids still exist, schedule another extension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly edit this comment to add "with the same deadline for how long the lease can be extended"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
No description provided.