Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-4674: Port daemon_memcached plugin to MariaDB (GSoC 2015) #126

Closed
wants to merge 1 commit into from

Conversation

piotrjurkiewicz
Copy link

@piotrjurkiewicz piotrjurkiewicz commented Nov 29, 2015

This is the result of my Google Summer of Code 2015 project (see a detailed project proposal here).

I have squashed everything into one commit and rebased it on the top of 10.2 branch. If you are interested in details of my changes over the MySQL version of the plugin, you can find commit history with detailed messages here: https://github.com/piotrjurkiewicz/mariadb-server/commits/10.1-memcached

You can also take a look on the final report from my project: https://lists.launchpad.net/maria-developers/msg08868.html

Since the final report I have introduced the following changes:

  • unbundled libevent -- now system libevent library is required during the compilation of plugin, can be linked statically or dynamically (by default dynamically, can be chosen via CMake option)
  • reworked transfer of InnoDB API callback array pointer to the plugin -- now plugin obtains pointer via global variable (if using statically linked InnoDB engine) or with the help of dlsym() (if using dynamically linked InnoDB engine plugin), instead using special purpose field in handlerton structure, this method works both with xtradb and innodb_plugin (see this commit piotrjurkiewicz/mariadb-server@0596ee1)

Unfortunately, after rebasing on the top of 10.2 branch I noticed that two tests (daemon_memcached.mysql_rpl_1 and daemon_memcached.mysql_rpl_2) started to fail. When daemon_memcached_engine_ib tries to write to the binlog, the server crashes because table->rpl_write_set is NULL.

#2  <signal handler called>
#3  0x00007febdad64710 in bitmap_bits_set ()
#4  0x00007febda9a296d in pack_row(TABLE*, st_bitmap const*, unsigned char*, unsigned char const*) ()
#5  0x00007febda73b936 in THD::binlog_write_row(TABLE*, bool, unsigned char const*) ()
#6  0x00007febda8e53ef in Write_rows_log_event::binlog_row_logging_function(THD*, TABLE*, bool, unsigned char const*, unsigned char const*) ()
#7  0x00007febda8e421a in binlog_log_row(TABLE*, unsigned char const*, unsigned char const*, bool (*)(THD*, TABLE*, bool, unsigned char const*, unsigned char const*)) ()
#8  0x00007febd05f7c6e in innodb_api_insert () from /usr/local/mysql/lib/plugin/daemon_memcached_engine_ib.so

I think that it is somehow related to this commit 8bd5301, but I don't know where and how this should be fixed. The same daemon_memcached_engine_ib binlog writing code works fine with MySQL.

@svoj
Copy link

svoj commented Dec 1, 2015

Hi Piotr,

Thanks for your contribution. JIRA task just for the record: https://mariadb.atlassian.net/browse/MDEV-4674

This task was added to 10.2 backlog, which is not yet scheduled (next sprint is expected in a month or so).

Similar to other open source projects, the MariaDB Foundation needs to have shared ownership of all code that is included in the MariaDB distribution. The easiest way to achieve this is by submitting your code under the BSD-new license.

The other alternative is to sign the code contribution agreement which can be found here: https://mariadb.com/kb/en/mariadb/mca/

Please indicate in a comment below that you are contributing your new code of the whole pull request, including one or several files that are either new files or modified ones, under the BSD-new license or that you have filled out the contribution agreement and sent it.

Thanks,
Sergey

@piotrjurkiewicz
Copy link
Author

Most of the code is taken from MySQL, with my minor changes. Therefore it is licensed under GNU license. The code also incorporates original memcached daemon code, which is licensed under BSD. So I don't know if I can re-license it under BSD-new.

@svoj
Copy link

svoj commented Dec 7, 2015

Piotr, in this case all we need is confirmation that changes done on your behalf are BSD-new. You don't need to declare original code license.

@piotrjurkiewicz
Copy link
Author

OK, I confirm that all my changes are under the BSD-new license.

Piotr Jurkiewicz

On 7 gru 2015, at 09:56, Sergey notifications@github.com wrote:

Piotr, in this case all we need is confirmation that changes done on your behalf are BSD-new. You don't need to declare original code license.


Reply to this email directly or view it on GitHub.

@svoj svoj added this to the 10.2 milestone Mar 1, 2017
@svoj svoj unassigned byte Mar 1, 2017
@vuvova
Copy link
Member

vuvova commented Apr 20, 2017

@byte — do you still want to work on this feature? Otherwise we'll have to close it, there's nobody to work on it and nobody is asking for it either.

@vuvova vuvova closed this Apr 25, 2017
@GwynethLlewelyn
Copy link

Ouch, I came in five years too late, it seems... I just wanted to add my support for an embedded Memcached in MariaDB. The concept is so cool! But I fully understand that such a plugin would require a commitment to long-term support; and I'm far too rusty (and outdated!) in C/C++ to do that, so... I guess it's back to the good, old, standalone Memcached 🤢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants