Changeset: 1c5d3920d8a0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/1c5d3920d8a0
Branch: default
Log Message:
Merge with Mar2025 branch.
diffs (truncated from 330 to 300 lines):
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -380,8 +380,6 @@ gdk_export _Noreturn void GDKfatal(_In_z
#define THRDMASK (1U)
#define CHECKMASK (1U<<1)
#define CHECKDEBUG if (ATOMIC_GET(&GDKdebug) & CHECKMASK)
-#define PROPMASK (1U<<3) /* unused */
-#define PROPDEBUG if (ATOMIC_GET(&GDKdebug) & PROPMASK) /* unused */
#define IOMASK (1U<<4)
#define BATMASK (1U<<5)
#define PARMASK (1U<<7)
@@ -403,11 +401,6 @@ gdk_export _Noreturn void GDKfatal(_In_z
#define ALLOCMASK (1U<<26)
-/* M5, only; cf.,
- * monetdb5/mal/mal.h
- */
-#define OPTMASK (1U<<27)
-
#define HEAPMASK (1U<<28)
#define FORCEMITOMASK (1U<<29)
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -3791,6 +3791,8 @@ BBPsync(int cnt, bat *restrict subcommit
int n = subcommit ? 0 : -1;
FILE *obbpf, *nbbpf;
+ TRC_INFO(TM, "Committing %d bats\n", cnt - 1);
+
if (GDKfilepath(bakdir, sizeof(bakdir), 0, NULL, subcommit ? SUBDIR :
BAKDIR, NULL) != GDK_SUCCEED ||
GDKfilepath(deldir, sizeof(deldir), 0, NULL, DELDIR, NULL) !=
GDK_SUCCEED)
return GDK_FAIL;
@@ -3812,6 +3814,7 @@ BBPsync(int cnt, bat *restrict subcommit
BATiter bi, *bip;
const bat bid = i;
+ TRC_DEBUG(TM, "Commit bat %d\n", bid);
if (lock)
MT_lock_set(&GDKswapLock(bid));
/* set flag that we're syncing, i.e. that we'll
diff --git a/gdk/gdk_delta.c b/gdk/gdk_delta.c
--- a/gdk/gdk_delta.c
+++ b/gdk/gdk_delta.c
@@ -41,9 +41,8 @@ BATcommit(BAT *b, BUN size)
if (b == NULL)
return;
assert(size <= BATcount(b) || size == BUN_NONE);
- TRC_DEBUG(DELTA, "BATcommit1 %s free %zu ins " BUNFMT " base %p\n",
- BATgetId(b), b->theap->free, b->batInserted, b->theap->base);
+ BUN old = b->batInserted;
b->batInserted = size < BATcount(b) ? size : BATcount(b);
- TRC_DEBUG(DELTA, "BATcommit2 %s free %zu ins " BUNFMT " base %p\n",
- BATgetId(b), b->theap->free, b->batInserted, b->theap->base);
+ TRC_DEBUG(DELTA, "%s free %zu ins from " BUNFMT " to " BUNFMT " base
%p\n",
+ BATgetId(b), b->theap->free, old, b->batInserted,
b->theap->base);
}
diff --git a/gdk/gdk_tracer.h b/gdk/gdk_tracer.h
--- a/gdk/gdk_tracer.h
+++ b/gdk/gdk_tracer.h
@@ -108,6 +108,7 @@ typedef enum {
COMP( PERF ) \
COMP( TEM ) \
COMP( THRD ) \
+ COMP( TM ) \
\
COMP( GEOM ) \
COMP( FITS ) \
@@ -122,6 +123,7 @@ typedef enum {
COMP( MAL_REMOTE ) \
COMP( MAL_MAPI ) \
COMP( MAL_SERVER ) \
+ COMP( MAL_LOADER ) \
\
COMP( MAL_OPTIMIZER ) \
\
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -859,6 +859,10 @@ GDKsetdebug(unsigned debug)
GDKtracer_set_component_level("io", "debug");
else
GDKtracer_reset_component_level("io");
+ if (debug & LOADMASK)
+ GDKtracer_set_component_level("mal_loader", "debug");
+ else
+ GDKtracer_reset_component_level("mal_loader");
if (debug & PARMASK)
GDKtracer_set_component_level("par", "debug");
else
@@ -875,6 +879,10 @@ GDKsetdebug(unsigned debug)
GDKtracer_set_component_level("thrd", "debug");
else
GDKtracer_reset_component_level("thrd");
+ if (debug & TMMASK)
+ GDKtracer_set_component_level("tm", "debug");
+ else
+ GDKtracer_reset_component_level("tm");
}
unsigned
@@ -906,6 +914,9 @@ GDKgetdebug(void)
lvl = GDKtracer_get_component_level("io");
if (lvl && strcmp(lvl, "debug") == 0)
debug |= IOMASK;
+ lvl = GDKtracer_get_component_level("mal_loader");
+ if (lvl && strcmp(lvl, "debug") == 0)
+ debug |= LOADMASK;
lvl = GDKtracer_get_component_level("par");
if (lvl && strcmp(lvl, "debug") == 0)
debug |= PARMASK;
@@ -918,6 +929,9 @@ GDKgetdebug(void)
lvl = GDKtracer_get_component_level("thrd");
if (lvl && strcmp(lvl, "debug") == 0)
debug |= THRDMASK;
+ lvl = GDKtracer_get_component_level("tm");
+ if (lvl && strcmp(lvl, "debug") == 0)
+ debug |= TMMASK;
return (unsigned) debug;
}
diff --git a/monetdb5/mal/mal_linker.c b/monetdb5/mal/mal_linker.c
--- a/monetdb5/mal/mal_linker.c
+++ b/monetdb5/mal/mal_linker.c
@@ -202,8 +202,16 @@ loadLibrary(const char *filename, int fl
if (!handle) {
if (flag>0)
throw(LOADER, "loadLibrary",
RUNTIME_FILE_NOT_FOUND ":%s", s);
+ TRC_INFO(MAL_LOADER, "Module %s not loaded\n",
filename);
return MAL_SUCCEED;
}
+ TRC_INFO_IF(MAL_LOADER) {
+ if (is_monetdb5)
+ TRC_INFO_ENDIF(MAL_LOADER, "Module %s
loaded\n", filename);
+ else
+ TRC_INFO_ENDIF(MAL_LOADER, "Module %s loaded
from %s\n",
+ filename, nme);
+ }
}
while (!handle && *mod_path) {
@@ -272,6 +280,8 @@ loadLibrary(const char *filename, int fl
s, nme, dlerror());
}
#endif
+ if (handle)
+ TRC_INFO(MAL_LOADER, "Module %s loaded from %s\n",
filename, nme);
if (*p == 0 || handle != NULL)
break;
@@ -279,31 +289,38 @@ loadLibrary(const char *filename, int fl
}
if (handle == NULL) {
- if (!is_monetdb5
- && strcmp(filename, "sql") != 0
- && strcmp(filename, "generator") != 0
+ static const char *const optional[] = {
+#ifdef HAVE_CUDF
+ "capi",
+#endif
+#ifdef HAVE_FITS
+ "fits",
+#endif
#ifdef HAVE_GEOM
- && strcmp(filename, "geom") != 0
+ "geom",
#endif
-#ifdef HAVE_LIBR
- && strcmp(filename, "rapi") != 0
+#ifdef HAVE_NETCDF
+ "netcdf",
#endif
#ifdef HAVE_LIBPY3
- && strcmp(filename, "pyapi3") != 0
-#endif
-#ifdef HAVE_CUDF
- && strcmp(filename, "capi") != 0
+ "pyapi3",
#endif
-#ifdef HAVE_FITS
- && strcmp(filename, "fits") != 0
-#endif
-#ifdef HAVE_NETCDF
- && strcmp(filename, "netcdf") != 0
+#ifdef HAVE_LIBR
+ "rapi",
#endif
#ifdef HAVE_SHP
- && strcmp(filename, "shp") != 0
+ "shp",
#endif
- )
+ NULL
+ };
+ for (const char * const *p = optional; *p; p++) {
+ if (strcmp(filename, *p) == 0) {
+ TRC_INFO(MAL_LOADER, "Optional module %s not
loaded\n",
+ filename);
+ return MAL_SUCCEED;
+ }
+ }
+ if (!is_monetdb5 && strcmp(filename, "sql") != 0)
throw(LOADER, "loadLibrary",
RUNTIME_LOAD_ERROR
" could not locate library %s (from within
file '%s'): %s", s,
diff --git a/monetdb5/mal/mal_module.c b/monetdb5/mal/mal_module.c
--- a/monetdb5/mal/mal_module.c
+++ b/monetdb5/mal/mal_module.c
@@ -295,8 +295,9 @@ freeModule(Module m)
if ((s = findSymbolInModule(m, "epilogue")) != NULL) {
if (s->kind == COMMANDsymbol && s->func->argc <= 1 /* zero or
one arg */) {
int status = 0;
- str ret = MAL_SUCCEED;
+ str ret;
+ TRC_INFO(MAL_LOADER, "Unloading module %s\n", m->name);
ret = (*(str (*)(int *)) s->func->imp) (&status);
freeException(ret);
(void) status;
diff --git a/tools/mserver/mserver5.1.in b/tools/mserver/mserver5.1.in
--- a/tools/mserver/mserver5.1.in
+++ b/tools/mserver/mserver5.1.in
@@ -152,6 +152,27 @@ data will be written to disk.
The name of the database that a client can connect to is
.BR in\-memory .
.TP
+.B \-\-read\-password\-initialize\-and\-exit
+Read an unencrypted password from standard input and use it to set the
+password for the
+.B monetdb
+administrator user, initialize the database, and exit.
+If the database was already initialized, the administrator password is
+not changed.
+This option is used by
+.IR monetdbd (1)
+when creating a new database with an administrator password and should
+not be used otherwise.
+.TP
+.B \-\-process\-wal\-and\-exit
+Stop the server immediately after processing the write-ahead log.
+.TP
+.B \-\-clean\-BBP
+Clean up junk BATs from the BBP (i.e. the database). These are BATs
+that were accidentally left around by older versions of the software
+(the current version is not known to do this) and so this option should
+not normally be used.
+.TP
\fB\-\-debug\fP[\fB=\fP\fIvalue\fP]
.PD 0
.TP
@@ -184,6 +205,9 @@ The value is an integer, which can be (a
.B 128
(PARMASK) Thread management
.TP
+.B 256
+(TESTINGMASK) Used for testing
+.TP
.B 512
(TMMASK) Transaction management
.TP
@@ -191,7 +215,7 @@ The value is an integer, which can be (a
(TEMMASK) Locks and Triggers
.TP
.B 4096
-(PERFMASK) BBP Performance (?)
+(PERFMASK) BBP Performance
.TP
.B 8192
(DELTAMASK) Delta debugging (?)
@@ -199,6 +223,12 @@ The value is an integer, which can be (a
.B 16384
(LOADMASK) Module loading
.TP
+.B 32768
+(PUSHCANDMASK)
+.TP
+.B 65536
+(TAILCHKMASK) Check sizes of .tail files during low-level commit
+.TP
.B 1048576
(ACCELMASK) Accelerator debugging
.TP
@@ -224,10 +254,6 @@ measurements
(ALLOCMASK) exhaustive GDK malloc & free tracing
for debugging (GDK developers, only)
.TP
-.B 134217728
-(OPTMASK) trace the actions, decisions and
-effects of MAL optimizers
-.TP
.B 268435456
(HEAPMASK) trace/debug HEAPextend;
used only for development & debugging
@@ -275,21 +301,6 @@ Equivalent to \fB\-\-debug=\fP\fI(THRDMA
.TP
.B \-\-transactions
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]