Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am working with

  • MySQL Cluster 7.2.4
  • memcached 1.6

I started memcached service with ndb-caching option:

memcached -E /usr/local/mysql/lib/ndb_engine.so -e "connectstring=10.12.200.117:1186;role=ndb-caching;debug=true" -vv -c 20 -u root


mysql> SELECT * FROM memcache_server_roles where role_name='ndb-caching'; 
+-------------+---------+---------+---------------------+ 
| role_name   | role_id | max_tps | update_timestamp    | 
+-------------+---------+---------+---------------------+ 
| ndb-caching | 3       | 100000  | 2012-03-21 17:53:45 | 
+-------------+---------+---------+---------------------+ 

with role id 3

mysql> SELECT * FROM key_prefixes where server_role_id=3; 
+----------------+------------+------------+---------+-------------+ 
| server_role_id | key_prefix | cluster_id | policy  | container   | 
+----------------+------------+------------+---------+-------------+ 
| 3              | b:         | 0          | caching | demo_ext    | 
| 3              | t:         | 0          | caching | demo_tabs   | 
| 3              |            | 0          | caching | demo_table  | 
| 3              | d:         | 0          | caching | deepak_new  | 
| 3              | dee:       | 0          | caching | deepak_new1 | 
+----------------+------------+------------+---------+-------------+ 

I just looked into demo_tabs container

mysql> SELECT * FROM containers where name='demo_tabs'; 
 +-----------+-------------+-----------------+-------------+----------------+-------+------------------+------------+--------------------+--------------------+
 | name      | db_schema   | db_table        | key_columns | value_columns  | flags | increment_column | cas_column | expire_time_column | large_values_table |
 +-----------+-------------+-----------------+-------------+----------------+-------+------------------+------------+--------------------+--------------------+
 | demo_tabs | ndbmemcache | demo_table_tabs | mkey        | val1,val2,val3 | flags | NULL             | NULL       | expire_time | NULL |
 +-----------+-------------+-----------------+-------------+----------------+-------+------------------+------------+--------------------+--------------------+

Now I saw the contents in the ndbmemcache.demo_table_tabs table:

select * from ndbmemcache.demo_table_tabs; 

mysql> select * from ndbmemcache.demo_table_tabs; 
+------+--------------+------+------+-------+-------------+ 
| mkey | val1         | val2 | val3 | flags | expire_time | 
+------+--------------+------+------+-------+-------------+ 
| 2    | abcdefghijlk | NULL | NULL | NULL  | NULL        | 
+------+--------------+------+------+-------+-------------+ 

I expect for the key t:2 values abcdefghijlk, but this value is not there in cache -- it's only in the database.

But still I run get t:2 in telnet the connection closes unexpectedly:

[root@cent2 ~]# telnet localhost 11211 
Trying 127.0.0.1... 
Connected to localhost.localdomain (127.0.0.1). 
Escape character is '^]'. 
get t:2 
Connection closed by foreign host. 
[root@cent2 ~]# 

The memcached service stopped with error message:

[root@cent2 ~]#memcached -E /usr/local/mysql/lib/ndb_engine.so -e "connectstring=10.12.200.117:1186;role=ndb-caching;debug=true" -vv -c 20 -u root
 .......................... 
.......................... 
worker.1 schedule():1.0 placed on send queue. 
cl0.conn1.send run_ndb_send_thread():Sent 1.0 
cl0.conn1.poll run_ndb_poll_thread(): ** adding 1.0 to wait group ** 
cl0.conn1.poll run_ndb_poll_thread():Polling 1.0 
cl0.conn1.poll callback_main():Success. 
cl0.conn1.poll worker_finalize_read():1.0 
cl0.conn1.poll --> build_hash_item() 
cl0.conn1.poll build_hash_item():nbytes: 21 ncopied: 16 
Segmentation fault 
[root@cent2 ~]# 

Why is this service closing unexpectedly?

share|improve this question
add comment

1 Answer

It looks like a bug. Did the set work with multi-column values?

SET t:3 0 0 5
a\tb\tc

(\t is a tabulator)

share|improve this answer
1  
I may be missing something, but could you elaborate on this a bit? How the SET connects to the problem? –  dezso Nov 20 '12 at 10:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.