andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

Blame SOURCES/0017-Ticket-49618-Increase-cachememsize-and-dncachememsize.patch

433de7
From 60c0e7dfb30fbd8100d45e79d11141956f51656f Mon Sep 17 00:00:00 2001
433de7
From: Simon Pichugin <spichugi@redhat.com>
433de7
Date: Fri, 14 Dec 2018 17:34:34 +0100
433de7
Subject: [PATCH] Issue 49618 - Increase cachememsize and dncachememsize
433de7
 variable sizes
433de7
433de7
Description: nssapld-cachememsize is reverted to a smaller value
433de7
if the cap is reached. Increase it to UINT64.
433de7
433de7
https://pagure.io/389-ds-base/issue/49618
433de7
433de7
Reviewed by: tbordaz, mreynolds (Thanks!)
433de7
---
433de7
 ldap/servers/slapd/back-ldbm/ldbm_config.c          | 2 +-
433de7
 ldap/servers/slapd/back-ldbm/ldbm_instance_config.c | 4 ++--
433de7
 2 files changed, 3 insertions(+), 3 deletions(-)
433de7
433de7
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_config.c b/ldap/servers/slapd/back-ldbm/ldbm_config.c
433de7
index 4e1a94341..144c5efc5 100644
433de7
--- a/ldap/servers/slapd/back-ldbm/ldbm_config.c
433de7
+++ b/ldap/servers/slapd/back-ldbm/ldbm_config.c
433de7
@@ -2118,7 +2118,7 @@ ldbm_config_get(void *arg, config_info *config, char *buf)
433de7
         break;
433de7
     case CONFIG_TYPE_SIZE_T:
433de7
         val = (size_t)config->config_get_fn(arg);
433de7
-        sprintf(buf, "%lu", (long unsigned int)val);
433de7
+        sprintf(buf, "%" PRIu32, (uint32_t)val);
433de7
         break;
433de7
     case CONFIG_TYPE_UINT64:
433de7
         val = (uint64_t)((uintptr_t)config->config_get_fn(arg));
433de7
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c b/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
433de7
index 643628c85..5eac1c1df 100644
433de7
--- a/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
433de7
+++ b/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
433de7
@@ -366,11 +366,11 @@ ldbm_instance_config_require_index_set(void *arg,
433de7
  *----------------------------------------------------------------------*/
433de7
 static config_info ldbm_instance_config[] = {
433de7
     {CONFIG_INSTANCE_CACHESIZE, CONFIG_TYPE_LONG, "-1", &ldbm_instance_config_cachesize_get, &ldbm_instance_config_cachesize_set, CONFIG_FLAG_ALWAYS_SHOW | CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
433de7
-    {CONFIG_INSTANCE_CACHEMEMSIZE, CONFIG_TYPE_SIZE_T, DEFAULT_CACHE_SIZE_STR, &ldbm_instance_config_cachememsize_get, &ldbm_instance_config_cachememsize_set, CONFIG_FLAG_ALWAYS_SHOW | CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
433de7
+    {CONFIG_INSTANCE_CACHEMEMSIZE, CONFIG_TYPE_UINT64, DEFAULT_CACHE_SIZE_STR, &ldbm_instance_config_cachememsize_get, &ldbm_instance_config_cachememsize_set, CONFIG_FLAG_ALWAYS_SHOW | CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
433de7
     {CONFIG_INSTANCE_READONLY, CONFIG_TYPE_ONOFF, "off", &ldbm_instance_config_readonly_get, &ldbm_instance_config_readonly_set, CONFIG_FLAG_ALWAYS_SHOW | CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
433de7
     {CONFIG_INSTANCE_REQUIRE_INDEX, CONFIG_TYPE_ONOFF, "off", &ldbm_instance_config_require_index_get, &ldbm_instance_config_require_index_set, CONFIG_FLAG_ALWAYS_SHOW | CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
433de7
     {CONFIG_INSTANCE_DIR, CONFIG_TYPE_STRING, NULL, &ldbm_instance_config_instance_dir_get, &ldbm_instance_config_instance_dir_set, CONFIG_FLAG_ALWAYS_SHOW},
433de7
-    {CONFIG_INSTANCE_DNCACHEMEMSIZE, CONFIG_TYPE_SIZE_T, DEFAULT_DNCACHE_SIZE_STR, &ldbm_instance_config_dncachememsize_get, &ldbm_instance_config_dncachememsize_set, CONFIG_FLAG_ALWAYS_SHOW | CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
433de7
+    {CONFIG_INSTANCE_DNCACHEMEMSIZE, CONFIG_TYPE_UINT64, DEFAULT_DNCACHE_SIZE_STR, &ldbm_instance_config_dncachememsize_get, &ldbm_instance_config_dncachememsize_set, CONFIG_FLAG_ALWAYS_SHOW | CONFIG_FLAG_ALLOW_RUNNING_CHANGE},
433de7
     {NULL, 0, NULL, NULL, NULL, 0}};
433de7
 
433de7
 void
433de7
-- 
433de7
2.17.2
433de7