Closed mspielberg closed 8 years ago
Looks like one of the new tests is failing.
That aside, this looks like a great new feature. I'll leave a few nitpicky comments.
Also, really love the new tests :)
Interesting, this test passes in my local environment. The error messages from the test are also malformed, so it's possible that memcached is returning a control character that is disrupting the formatting. Do you know what version of memcached is running inside the test container?
Alright, I was able to find the raw test output showing the actual result of
Some("00 3
123
")
This is bizarre, and the "123" being used in other tests suggests some sort of memory corruption going on.
I was able to find the version of memcache used by looking here, which lead to here showing version 1.4.13.
I've been running the tests against 1.4.20 locally, and looking through the release notes for 1.4.17 lists the following fix:
Fix for incorrect length of initial value set via binary increment protocol.
So yes, there's a bug in the memcached used in travis for exactly the behavior we're testing for, setting a default value via binary increment when the specified key doesn't already exist. How would you like to proceed?
Nice find ! I think there are a few possible paths we can take
before_script
s to Travis.yml to manually install the newer Memcached version instead of just using services: memcached
. Since we are running in Container mode, we'll probably need to use the apt pluginI'm not quite sure which one is easier or better but I would personally prefer 2.
Since we are running in Container mode, we'll probably need to use the apt plugin
None of the existing whitelisted apt sources are later than Ubuntu Trusty, which only has memcached 1.4.14, and it looks like Travis is no longer accepting requests for additional sources to be added to the whitelist.
Other options seem to be to compile memcached from a source or binary tarball, but not install to avoid a need for sudo, or to switch to VM-based Travis instead of container-based. I'll start investigating a GCE VM-based build.
Cool stuff @mspielberg. Awesome work on getting Travis CI working well :)
I think this looks good right now. @alexandru do you want to merge this now and we can change the file to use result.tryComplete(Failure(ex))
in another commit?
@lloydmeta @mspielberg yes, go ahead.
@mspielberg FYI, the newly released v1.7.4 of Shade now includes your feature.
Memcache protocol and spymemcached support server-side atomic increment and decrement of keys with a specific format (ASCII-string of the decimal representation of an integer). This should help performance over client-managed CAS, especially for highly contented use cases.