Comments (1)
Comment from @txii
I'm trying to test eviction feature of ordinary memcached. For that purpose I created tarantool instance with memcached interface with small amount of memory available (~ 2mb or less) and started this small perl script to constantly set a key and get it back to check if it was written correctly:
use strict;
use warnings;
use Test::More 'no_plan';
use Cache::Memcached::Fast;
my $memd = new Cache::Memcached::Fast({
servers => [ "host:port" ],
nowait => 0,
hash_namespace => 0,
utf8 => ($^V ge v5.8.1 ? 1 : 0),
});
for my $i (8 .. 100_000) {
my $ttl = 5*60;
my $store_key = "ttladdmanythiskey$i";
my $store_value = "ttladdmanythisvalue$i";
is( $memd->get($store_key), undef, "Get not existent value for iteration $i" );
ok( $memd->set($store_key, $store_value, $ttl), "Set with ttl ok for iteration $i" );
is( $memd->get($store_key), $store_value, "Cmp value for iteration $i" );
}
I expect that set will be OK always, regardless of how much space is already used and whether or not the same key was already set (so set() is always ok). But a get errors for set() on ~ 100th (well, randomly, btw) iteration of the loop.
The same error is repoduced when ->add is used instead of ->set.
Also I used tcpdump to see tarantool responses. Some of them were:
0x0000: 4500 007a 9464 4000 3a06 d7e7 0aff da85 E..z.d@.:.......
0x0010: 053d e970 2bcb b6a1 d007 31d2 ba66 9ae9 .=.p+.....1..f..
0x0020: 8018 7120 6ac1 0000 0101 080a 5d23 a5ab ..q.j.......]#..
0x0030: f039 1d5f 5345 5256 4552 5f45 5252 4f52 .9._SERVER_ERROR
0x0040: 2046 6169 6c65 6420 746f 2061 6c6c 6f63 .Failed.to.alloc
0x0050: 6174 6520 3833 2062 7974 6573 2069 6e20 ate.83.bytes.in.
0x0060: 736c 6162 2061 6c6c 6f63 6174 6f72 2066 slab.allocator.f
0x0070: 6f72 2074 7570 6c65 0d0a or.tuple..
So I think the problem is with memcached's eviction support.
from memcached.
Related Issues (20)
- Wrong check for 'readahead' option value
- Convert port number to string automatically HOT 1
- text/noreply.test.py fails sporadically
- Hotreload is unsupported
- libmemcached doesn't build on Ubuntu 22.04.1 LTS HOT 4
- module doesn't work correctly after switching rw->ro->rw HOT 2
- Set up simple CI based on GitHub Actions
- Unclear error when memcached instance created without box initialization
- No such option 'proto'
- CMake target 'libmemcached' is broken HOT 5
- Fix memtier benchmark
- Update tests for Python 3
- memcached uses libmemcached in personal GH account
- CMake target 'libmemcached' is not idempotent
- Use libmemcached benchmark memaslap
- Replace libmemcached GIT submodule with OS package libmemcached HOT 6
- Bump version of memtier submodule
- Bump version of small library HOT 1
- All memcached tests fail with tarantool 2.10.0-beta1-376-gd2a012455 (master branch) HOT 3
- Report statistics to tarantool/metrics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memcached.