#50423 ticket 49476 - refactor ldbm backend to allow replacement of BDB
Closed by spichugi. Opened by lkrispen.
lkrispen/389-ds-base t49476-3  into  master

Download 50423.patch

this is a new version of the first phase of the backend redesign, I addressed the comments in the previous PR, run tests with ASAN to avoid crashes and mem leaks.
Since the changes are large I preferred to do a new PR instead of adding the patches to address the issues raised to the previous one

indentation :-)

indentation :-)
could probably be improved :-)

Would it be a good time to switch all the "int"'s to "int32_t"'s, and longs, etc? It's not that important, but since we're rewriting it might be a good time to clean it up

Would it be a good time to switch all the "int"'s to "int32_t"'s, and longs, etc? It's not that important, but since we're rewriting it might be a good time to clean it up

in the back-bdb directory definitely, and probably in the changed files in back-ldbm as well

I ran tier0 tests and some of them failed:

dirsrvtests/tests/suites/config/autotuning_test.py
dirsrvtests/tests/suites/config/config_test.py::test_config_deadlock_policy
dirsrvtests/tests/suites/config/regression_test.py::test_set_cachememsize_to_custom_value

Running tier1 now...

I ran tier0 tests and some of them failed:
dirsrvtests/tests/suites/config/autotuning_test.py
dirsrvtests/tests/suites/config/config_test.py::test_config_deadlock_policy
dirsrvtests/tests/suites/config/regression_test.py::test_set_cachememsize_to_custom_value

well, I think these change database params, which are now in the cn=bdb entry, that is something to check how smart we have to be to accept "old" params and apply them to the new entry

These should be int64_t

int64_t to correspond to the suggested change in db_atol()

Minor compiler warnings:

../389-ds-base/ldap/servers/slapd/back-ldbm/back-bdb/bdb_config.c: In function ‘split_bdb_config_entry’:
../389-ds-base/ldap/servers/slapd/back-ldbm/back-bdb/bdb_config.c:2180:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
At top level:
../389-ds-base/ldap/servers/slapd/back-ldbm/back-bdb/bdb_config.c:154:1: warning: ‘bdb_config_pagedlookthroughlimit_set’ defined but not used [-Wunused-function]
 bdb_config_pagedlookthroughlimit_set(void *arg, void *value, char *errorbuf __attribute__((unused)), int phase __attribute__((unused)), int apply)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../389-ds-base/ldap/servers/slapd/back-ldbm/back-bdb/bdb_config.c:146:1: warning: ‘bdb_config_pagedlookthroughlimit_get’ defined but not used [-Wunused-function]
 bdb_config_pagedlookthroughlimit_get(void *arg)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../389-ds-base/ldap/servers/slapd/back-ldbm/back-bdb/bdb_instance_config.c:419:1: warning: ‘read_instance_attrcrypt_entries’ defined but not used [-Wunused-function]
 read_instance_attrcrypt_entries(ldbm_instance *inst)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../389-ds-base/ldap/servers/slapd/back-ldbm/back-bdb/bdb_instance_config.c:375:1: warning: ‘read_instance_index_entries’ defined but not used [-Wunused-function]
 read_instance_index_entries(ldbm_instance *inst)

Also, this is really minor and nit pick, but I'd prefer the new subdirectory to be "bdb" instead of back-bdb. Its already under back-ldbm. Seems a bit redundant. Either way its up to you I don't care if you change it, but I just wanted to voice my opinion.

tier1 failures:

dirsrvtests/tests/suites/attr_encryption/attr_encryption_test.py::test_attr_encryption_backends
dirsrvtests/tests/suites/dynamic_plugins/dynamic_plugins_test.py::test_acceptance
dirsrvtests/tests/suites/dynamic_plugins/dynamic_plugins_test.py::test_memory_corruption
dirsrvtests/tests/suites/import/regression_test.py::test_del_suffix_import
dirsrvtests/tests/suites/import/regression_test.py::test_del_suffix_backend
dirsrvtests/tests/suites/replication/regression_test.py::test_online_reinit_may_hang
dirsrvtests/tests/suites/vlv/regression_test.py::test_bulk_import_when_the_backend_with_vlv_was_recreated

replaced by PR50596

Pull-Request has been closed by lkrispen

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3481

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata