← Back to team overview

maria-developers team mailing list archive

[GSoC] MDEV-4674 Port InnoDB memcached interface to MariaDB - Midterm report

 

Hi all,

as the midterm is approaching, I am posting a report on what I have done so far.

The project is going as scheduled. You can see the timeline in my proposal:

http://www.google-melange.com/gsoc/proposal/public/google/gsoc2015/piotrjurkiewicz/5743522325987328

All goals planned before the midterm have been reached. InnoDB Memcached plugin ported from MySQL works now with MariaDB (both with InnoDB and XtraDB engines). That means that MariaDB is now on par with MySQL on this issue.

My repository with the code is available here: https://github.com/piotrjurkiewicz/mariadb-server

What have been done in details:

1. Code of InnoDB Memcached plugin has been imported from MySQL into the MariaDB tree.

2. There were some differences between MariaDB and MySQL, which blocked the plugin from out-of-the-box compilation and correct operation. They have been resolved.

3. Test suite for the plugin has been imported from MySQL. Compatibility changes were introduced into these test cases which required them. The test suite was modified to assign memcached port number dynamically from mtr worker's pool, what allows to run the same test in parallel for many combinations.

The plugin fully passes the test suite, both for 'innodb_plugin' and 'xtradb' combinations.

4. Some enhancements and bug fixes have been introduced into the plugin:

- detection of memcached daemon initialization has been fixed -- this eliminated unnecessary wait (15 seconds) on plugin shutdown and memory leak (in cases when plugin failed to initialize properly before)

- memcached arithmetic commands (incr/decr) handling has been improved -- now numeric columns values are handled in a consistent and predictable way

- incorrect handling of unsigned not null integers columns has been fixed

For details of all changes please see commit messages associated with them: https://github.com/piotrjurkiewicz/mariadb-server/commits/10.1-memcached

After the midterm, I plan to focus on further enhancements of the plugin, as stated in my proposal:

1. Change plugin architecture to "one table per socket", as originally proposed in MDEV-4674 bug report. This will allow usage of well known security solutions (firewalls, unix file permissions) to restrict access to different tables for different users.

2. Implement a new interface inside the Memcached plugin, which will use Handler API for database access. This will make possible to use the plugin with database engines other than InnoDB/XtraDB. Ultimately, this interface will replace existing InnoDB direct API interface (if there will be no significant performance differences).

Therefore, I would like to as you to point me to Handler API documentation (if documentation such exists). I know that HandlerSocket plugin uses the Handler API to access databases. Is HandlerSocket plugin a good example of Handler API usage to follow?

Piotr