dropbox / godropbox

Common libraries for writing Go services/applications.
BSD 3-Clause "New" or "Revised" License
4.17k stars 427 forks source link

Per-request memcache client timeouts #244

Closed benkaras closed 2 years ago

benkaras commented 4 years ago

Would you be open to a pull-request adding support for customizing the timeouts on individual memcache requests? For example, 10ms for Get() and 100ms for a later Get().

Since this is a larger change, I wanted to check with you first before digging into this.

Rough Proposal: Pass deadline using context.Context. To keep API compatibility, introduce new interfaces for this purpose: ContextClient, ContextClientShard, ContextManagedConn etc. Have existing implementations pass context.Background() to the new methods. It should be possible to leave the existing API unchanged.

Please let me know if you'd be open to such a change, or if there's a different approach you'd prefer me to take here.

Thanks in advance, Ben Karas Google

benkaras commented 4 years ago

Hi Shailesh,

Thank you for checking! I have a change about 95% done to implement this. It's fairly extensive since it adds interfaces that take context.Context as the 1st param. Do you want to help review it when it's ready?

-Ben

On Sat, Aug 22, 2020 at 9:48 AM Shailesh notifications@github.com wrote:

Is this still open? Can I take this up?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dropbox/godropbox/issues/244#issuecomment-678663733, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEN5L2JZIV6GYWK3N4VVU7TSB7ZHPANCNFSM4PEEWHCA .

ShaileshSurya commented 4 years ago

Hi @benkaras,

Yes, I would love to do that. Please do mention to me once it is ready.

orborde commented 2 years ago

This sure doesn't look like it's gonna happen. Feel free to reopen if I've guessed wrongly!