Changeset: 741a9e16078e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/741a9e16078e
Modified Files:
gdk/gdk_utils.c
sql/test/BugTracker-2021/Tests/serializable-snapshot.Bug-7200.SQL.py
Branch: default
Log Message:
include GDK_l3_size in GDKenv
diffs (58 lines):
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -433,6 +433,8 @@ size_t GDK_mmap_minsize_transient = MMAP
size_t GDK_mmap_pagesize = MMAP_PAGESIZE; /* mmap granularity */
size_t GDK_mem_maxsize = GDK_VM_MAXSIZE;
size_t GDK_vm_maxsize = GDK_VM_MAXSIZE;
+BUN GDKL3_size = 0;
+
#define SEG_SIZE(x) (((x) + _MT_pagesize - 1) & ~(_MT_pagesize - 1))
@@ -1193,8 +1195,15 @@ GDKinit(opt *set, int setlen, bool embed
#else
GDKL3_size = 16*1024*1024;
#endif
- if ((p = GDKgetenv("gdk_l3_size")) != NULL)
+ if ((p = GDKgetenv("gdk_l3_size")) != NULL) {
GDKL3_size = (BUN) strtoll(p, NULL, 10);
+ } else {
+ snprintf(buf, sizeof(buf), "%zu", GDKL3_size);
+ if (GDKsetenv("gdk_l3_size", buf) != GDK_SUCCEED) {
+ TRC_CRITICAL(GDK, "GDKsetenv gdk_l3_size failed");
+ return GDK_FAIL;
+ }
+ }
if (!GDKinmemory(0)) {
if ((p = GDKgetenv("gdk_dbpath")) != NULL &&
@@ -1288,8 +1297,6 @@ GDKinit(opt *set, int setlen, bool embed
return GDK_SUCCEED;
}
-BUN GDKL3_size = 0;
-
bool
GDKexiting(void)
{
diff --git
a/sql/test/BugTracker-2021/Tests/serializable-snapshot.Bug-7200.SQL.py
b/sql/test/BugTracker-2021/Tests/serializable-snapshot.Bug-7200.SQL.py
--- a/sql/test/BugTracker-2021/Tests/serializable-snapshot.Bug-7200.SQL.py
+++ b/sql/test/BugTracker-2021/Tests/serializable-snapshot.Bug-7200.SQL.py
@@ -9,6 +9,7 @@ cursor2 = client2.cursor()
MAX_ITERATIONS = 1000
EXPECTED_SUM = sum(range(0, MAX_ITERATIONS))
+cursor1.execute("DROP TABLE if exists T;")
cursor1.execute("CREATE TABLE T (k INT PRIMARY KEY, v INT);")
class TestClient(threading.Thread):
@@ -38,8 +39,6 @@ if res != [(MAX_ITERATIONS, MAX_ITERATIO
sys.stderr.write("[(%d,%d,%d)] expected, [(%d,%d,%d)] received" %
(MAX_ITERATIONS, MAX_ITERATIONS, EXPECTED_SUM, res[0][0], res[0][1], res[0][2]))
-cursor1.execute("DROP TABLE T;")
-
cursor1.close()
cursor2.close()
client1.close()
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]