Blame SOURCES/db-5.3.28-mmap-high-cpu-usage.patch

b30d9d
Author: Filip Januš <fjanus@redhat.com>
b30d9d
Date: 6 Sep 2021
b30d9d
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1992402
b30d9d
Patch was created based on the discussion in the previous link
b30d9d
diff -ur db-5.3.28/src/os/os_map.c db_patch/src/os/os_map.c
b30d9d
--- db-5.3.28/src/os/os_map.c	2013-09-09 17:35:09.000000000 +0200
b30d9d
+++ db_patch/src/os/os_map.c	2021-09-09 07:33:12.027328265 +0200
b30d9d
@@ -213,7 +213,10 @@
b30d9d
 	if (rp->max < rp->size)
b30d9d
 		rp->max = rp->size;
b30d9d
 	if (ret == 0 && F_ISSET(infop, REGION_CREATE)) {
b30d9d
-		if (F_ISSET(dbenv, DB_ENV_REGION_INIT))
b30d9d
+
b30d9d
+		rp->size = rp->max;
b30d9d
+
b30d9d
+        if (F_ISSET(dbenv, DB_ENV_REGION_INIT))
b30d9d
 			ret = __db_file_write(env, infop->fhp,
b30d9d
 			    rp->size / MEGABYTE, rp->size % MEGABYTE, 0x00);
b30d9d
 		else