Changeset: c99ae91ec14d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c99ae91ec14d
Modified Files:
gdk/gdk_logger.c
sql/storage/bat/bat_logger.c
Branch: transaction-replication
Log Message:
Partly revert the "fix" in logger_load from revision 51510
- It seems one needs to force the logger to find the persistent catalog upon
shared logger init to make things work
Fix a bug in bl_cleanup_shared
diffs (32 lines):
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -1271,11 +1271,11 @@ logger_load(int debug, char* fn, char fi
snprintf(bak, BUFSIZ, "%s_catalog_bid", fn);
catalog_bid = BBPindex(bak);
- if (catalog_bid == 0 ) {
- if (!lg->readonly) {
- if (logger_create_catalog_file(debug, lg, fn, fp,
filename, bak) == LOG_ERR) {
- goto error;
- }
+ /* this is intentional - even if catalog_bid, but the logger is
read-only,
+ * force it to find the persistent catalog */
+ if (catalog_bid == 0 && !lg->readonly) {
+ if (logger_create_catalog_file(debug, lg, fn, fp, filename,
bak) == LOG_ERR) {
+ goto error;
}
} else {
if (logger_find_persistent_catalog(lg, fn, fp, bak,
&catalog_bid, &catalog_nme) == LOG_ERR) {
diff --git a/sql/storage/bat/bat_logger.c b/sql/storage/bat/bat_logger.c
--- a/sql/storage/bat/bat_logger.c
+++ b/sql/storage/bat/bat_logger.c
@@ -340,7 +340,7 @@ bl_cleanup(int keep_persisted_log_files)
static int
bl_cleanup_shared(int keep_persisted_log_files)
{
- if (bat_logger)
+ if (bat_logger_shared)
return logger_cleanup(bat_logger_shared,
keep_persisted_log_files);
return LOG_OK;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list