Changeset: 5cd04cd1f144 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5cd04cd1f144
Removed Files:
        monetdb5/modules/kernel/logger.c
        monetdb5/modules/kernel/logger.mal
Modified Files:
        clients/Tests/exports.stable.out
        gdk/gdk_logger.c
        gdk/gdk_logger.h
        monetdb5/modules/kernel/Makefile.ag
Branch: default
Log Message:

Removed unused logger module.


diffs (190 lines):

diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -2340,8 +2340,6 @@ str listRef;
 str loadLibrary(str modulename, int flag);
 char *locate_file(const char *basename, const char *ext, bit recurse);
 str lockRef;
-str logger_create_wrap(logger *L, int *debug, str *fn, str *dirname, int 
*version);
-str logger_destroy_wrap(void *ret, logger *L);
 str lookupRef;
 str mal2str(MalBlkPtr mb, int first, int last);
 int malAtomSize(int size, const char *name);
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -2253,21 +2253,6 @@ logger_new(int debug, const char *fn, co
        return NULL;
 }
 
-/* Reload logger
- * It will load any data in the logdir and persist it in the BATs */
-gdk_return
-logger_reload(logger *lg)
-{
-       char filename[FILENAME_MAX];
-
-       snprintf(filename, sizeof(filename), "%s", lg->dir);
-       if (lg->debug & 1) {
-               fprintf(stderr, "#logger_reload %s\n", filename);
-       }
-
-       return logger_load(lg->debug, lg->fn, filename, lg);
-}
-
 /* Create a new logger */
 logger *
 logger_create(int debug, const char *fn, const char *logdir, int version, 
preversionfix_fptr prefuncp, postversionfix_fptr postfuncp)
diff --git a/gdk/gdk_logger.h b/gdk/gdk_logger.h
--- a/gdk/gdk_logger.h
+++ b/gdk/gdk_logger.h
@@ -110,7 +110,6 @@ gdk_export gdk_return logger_cleanup(log
 gdk_export void logger_with_ids(logger *lg);
 gdk_export lng logger_changes(logger *lg);
 gdk_export int logger_sequence(logger *lg, int seq, lng *id);
-gdk_export gdk_return logger_reload(logger *lg);
 
 /* todo pass the transaction id */
 gdk_export gdk_return log_bat(logger *lg, BAT *b, const char *n, char tpe, oid 
id);
diff --git a/monetdb5/modules/kernel/Makefile.ag 
b/monetdb5/modules/kernel/Makefile.ag
--- a/monetdb5/modules/kernel/Makefile.ag
+++ b/monetdb5/modules/kernel/Makefile.ag
@@ -23,7 +23,6 @@ lib_kernel = {
                batmmath.c batmmath.h \
                batstr.c \
                group.c group.h \
-               logger.c \
                microbenchmark.c microbenchmark.h \
                mmath.c mmath.h mmath_private.h \
                status.c status.h 
@@ -36,7 +35,7 @@ headers_mal = {
                mmath.mal alarm.mal batstr.mal \
                batcolor.mal batmmath.mal \
                group.mal aggr.mal \
-               logger.mal microbenchmark.mal
+               microbenchmark.mal
 }
 
 headers_hge = {
diff --git a/monetdb5/modules/kernel/logger.c b/monetdb5/modules/kernel/logger.c
deleted file mode 100644
--- a/monetdb5/modules/kernel/logger.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0.  If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
- */
-
-/*
- * @f logger
- * @a N. J. Nes
- * @v 2.0
- * @+ The Transaction Logger
- * In the philosophy of MonetDB, transaction management overhead should only
- * be paid when necessary. Transaction management is for this purpose
- * implemented as a separate module and applications are required to
- * obey the transaction policy, e.g. obtaining/releasing locks.
- *
- * This module is designed to support efficient logging of the SQL database.
- * Once loaded, the SQL compiler will insert the proper calls at
- * transaction commit to include the changes in the log file.
- *
- * The logger uses a directory to store its log files. One master log file
- * stores information about the version of the logger and the transaction
- * log files. This file is a simple ascii file with the following format:
- *  @code{6DIGIT-VERSION\n[log file number \n]*]*}
- * The transaction log files have a binary format, which stores fixed size
- * logformat headers (flag,nr,bid), where the flag is the type of update 
logged.
- * The nr field indicates how many changes there were (in case of 
inserts/deletes).
- * The bid stores the bid identifier.
- *
- * The key decision to be made by the user is the location of the log file.
- * Ideally, it should be stored in fail-safe environment, or at least
- * the log and databases should be on separate disk columns.
- *
- * This file system may reside on the same hardware as the database server
- * and therefore the writes are done to the same disk, but could also
- * reside on another system and then the changes are flushed through the 
network.
- * The logger works under the assumption that it is called to safeguard
- * updates on the database when it has an exclusive lock on
- * the latest version. This lock should be guaranteed by the calling
- * transaction manager first.
- *
- * Finding the updates applied to a BAT is relatively easy, because each
- * BAT contains a delta structure. On commit these changes are
- * written to the log file and the delta management is reset. Since each
- * commit is written to the same log file, the beginning and end are
- * marked by a log identifier.
- *
- * A server restart should only (re)process blocks which are completely
- * written to disk. A log replay therefore ends in a commit or abort on
- * the changed bats. Once all logs have been read, the changes to
- * the bats are made persistent, i.e. a bbp sub-commit is done.
- *
- * @+ Module Definition
- */
-/*
- * @+ Implementation Code
- */
-#include "monetdb_config.h"
-#include "gdk.h"
-#include "gdk_logger.h"
-#include "mal.h"
-#include "mal_exception.h"
-
-/* the wrappers */
-mal_export str logger_create_wrap( logger *L, int *debug, str *fn, str 
*dirname, int *version);
-
-str
-logger_create_wrap( logger *L, int *debug, str *fn, str *dirname, int *version)
-{
-       logger *l = logger_create(*debug, *fn, *dirname, *version, NULL, NULL);
-
-       if (l) {
-               *(logger**)L = l;
-               return MAL_SUCCEED;
-       }
-       throw(MAL, "logger.create", OPERATION_FAILED "database %s version %d" ,
-               *dirname, *version);
-}
-
-mal_export str logger_destroy_wrap(void *ret, logger *L ) ;
-
-str
-logger_destroy_wrap(void *ret, logger *L )
-{
-       logger *l = *(logger**)L;
-       (void) ret;
-       if (l) {
-               logger_destroy(l);
-               return MAL_SUCCEED;
-       }
-       throw(MAL, "logger.destroy", OPERATION_FAILED);
-}
diff --git a/monetdb5/modules/kernel/logger.mal 
b/monetdb5/modules/kernel/logger.mal
deleted file mode 100644
--- a/monetdb5/modules/kernel/logger.mal
+++ /dev/null
@@ -1,18 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0.  If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
-
-module logger;
-
-atom logger = ptr;
-end;
-command create( debug:int, fn:str, dirname:str, version:int ):logger
-address logger_create_wrap
-comment "Create logger, check if recovery is needed. The fn variable names the 
frontend,this is needed to keep the catalog bat seperate";
-
-command destroy( l:logger ) :void
-address logger_destroy_wrap
-comment "Free the resources used by the logger.";
-
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to