parcio / julea

A Flexible Storage Framework for HPC
GNU Lesser General Public License v3.0
33 stars 31 forks source link

Fix DB benchmark for MySQL/MariaDB #161

Open kiraduwe opened 2 years ago

kiraduwe commented 2 years ago

In db/common.c schema_create and schema_deleteare called, passing an error, while in db/schema.c there are notes that the user should not pass an error to these functions.

Currently, it seems to work (maybe out of luck) when running SQLite server on the same host as the benchmark. However, when MariaDB is used (with Singularity), it fails.

/db/entry/insert:                     **
JULEA:ERROR:../benchmark/db/common.c:131:_benchmark_db_prepare_scheme: 'ret' should be TRUE
Bail out! JULEA:ERROR:../benchmark/db/common.c:131:_benchmark_db_prepare_scheme: 'ret' should be TRUE

I assume this may be because the MariaDB server tries to access the address passed in the error pointer in its own address space. After all, the MariaDB server should not be able to access anything outside the container, right?

Passing NULL instead of the error pointer, seems to fix the problem.

michaelkuhn commented 2 years ago

This seems to be #130 and will probably require extensive changes in the db client to be fixed properly. Let's keep this open as a workaround for now.