cea-hpc / robinhood

Robinhood Policy Engine : a versatile tool to monitor filesystem contents and schedule actions on filesystem entries.
http://robinhood.sf.net
Other
177 stars 60 forks source link

Using the TokuDB engine assumes MariaDB #96

Open crashtest83 opened 6 years ago

crashtest83 commented 6 years ago

Currently if you use TokuDB as the engine in your configuration, it uses the MariaDB syntax for setting the TokuDB table compression. If someone wanted to use Percona Server there would need to be a way to designate in the ListManager that it should use ROW_FORMAT instead of COMPRESSION for the tokudb_compression parameter.

I'm not certain of a clean way to designate that I am using MariaDB vs Percona in this instance, however. Perhaps a flag in the config?

static void append_engine(GString *request)
{
#ifdef _MYSQL
    g_string_append_printf(request, " ENGINE=%s", lmgr_config.db_config.engine);

    if (strcasecmp(lmgr_config.db_config.engine, "TokuDB") == 0)
        g_string_append_printf(request, " COMPRESSION=%s",
                               lmgr_config.db_config.tokudb_compression);
#endif
}