Conversation
|
Looks pretty swanky on a first skim, neat! I'll review it more carefully and try using it locally to kick the API tires. hopefully won't take that long... |
|
(if there's something more useful I should be doing in a review, lmk. I'm relatively informal). Writing out my understanding of the high level logic... User
Internal
Then there's a bunch of logic around when to dial, how much to enqueue before adding a new dial, reaping idle connections, etc. Some requests can be retried and some fail if a connection is lost. Will look more into that. Starter questions?
Queue handling differences from my own workIn my own code I try to minimize the number of connections, but this requires changes around guarantees...
Concern is with a small pipeline (8) someone doing a bulk load or fetch (say 1,000 small writes) ends up waiting for 120+ roundtrips. User has to recognize this situation and change the pipeline value to be higher. Typically this means they do a benchmark and decide it's slow. @bradfitz Here's some high level stuff then I'll look into more detail? Code looks good enough that I probably have no business reviewing it. Maybe some concern over the number of channel trips becoming a performance bottleneck? edit: fwiw I don't use AI when reviewing code. hopefully that makes my words worth reading :P |
| module github.com/bradfitz/gomemcache | ||
|
|
||
| go 1.18 | ||
| go 1.26 |
There was a problem hiding this comment.
I typically like to support at least the last two versions of Go to follow the upstream support lifecycle.
Also, since Go 1.21, this is now a semver tag.
| go 1.26 | |
| go 1.25.0 |
There was a problem hiding this comment.
Also, since Go 1.21, this is now a semver tag.
Not necessarily. It can be, but you can also just say 1.X if you don't care about specifics.
There was a problem hiding this comment.
True. But I still prefer the semver convention.
So, if we want to still support compile with 1.18, why not just leave this at 1.18 for now?
There was a problem hiding this comment.
See the comment in the test: I want to use synctest in tests so I can't use 1.18 in go.mod
Also: * add synctest tests, which requires newer Go, so build tag those out. We need to bump go.mod to get working synctest, so: * ... also add a CI check that we keep building with Go 1.18 for now, not using Go language/API changes newer than Go 1.18. * few more config knobs Fixes #160
|
@dormando, I pushed an update to handle SERVER_ERROR. Let's do batched set calls in a future PR. And yeah, no PTAL? |
|
@bradfitz awesome! I think most of what I yapped about can be iterated on in future PR's, except: need limit on Don't think I see a limit on the queue:
|
Also:
out. We need to bump go.mod to get working synctest, so:
not using Go language/API changes newer than Go 1.18.
Fixes #160