Lines 443-448
static inline int cache_update_entry_in_transaction(NotifierID id, char *dn, Cac
|
Link Here
|
---|
|
443 |
MDB_txn *write_txn; |
448 |
MDB_txn *write_txn; |
444 |
MDB_val key, data; |
449 |
MDB_val key, data; |
445 |
u_int32_t tmp_size = 0; |
450 |
u_int32_t tmp_size = 0; |
|
|
451 |
MDB_env *env; |
452 |
size_t mapsize; |
446 |
|
453 |
|
447 |
memset(&data, 0, sizeof(MDB_val)); |
454 |
memset(&data, 0, sizeof(MDB_val)); |
448 |
rv = unparse_entry(&data.mv_data, &tmp_size, entry); |
455 |
rv = unparse_entry(&data.mv_data, &tmp_size, entry); |
Lines 466-471
static inline int cache_update_entry_in_transaction(NotifierID id, char *dn, Cac
|
Link Here
|
---|
|
466 |
rv = mdb_put(write_txn, id2entry, &key, &data, 0); |
473 |
rv = mdb_put(write_txn, id2entry, &key, &data, 0); |
467 |
if (rv != MDB_SUCCESS) { |
474 |
if (rv != MDB_SUCCESS) { |
468 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "cache_update_entry: storing entry in database failed: %s", dn); |
475 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "cache_update_entry: storing entry in database failed: %s", dn); |
|
|
476 |
if (rv == MDB_MAP_FULL) { |
477 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "cache_update_entry: Please increase the value of the UCR variable listener/cache/mdb/maxsize"); |
478 |
env = mdb_txn_env(write_txn); |
479 |
mapsize = mdb_env_get_mapsize(env); |
480 |
univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "cache_update_entry: The current limit of %zu is too small", mapsize); |
481 |
} |
469 |
ERROR_MDB_ABORT(rv, "mdb_put"); |
482 |
ERROR_MDB_ABORT(rv, "mdb_put"); |
470 |
goto out; |
483 |
goto out; |
471 |
} |
484 |
} |