FT-294 Move the logging code to its own sudbdirectory, logger/

This commit is contained in:
John Esmet 2014-07-03 12:30:17 -04:00
parent 6e3d772fea
commit c821fd54e9
44 changed files with 101 additions and 102 deletions

View file

@ -7,7 +7,7 @@ set_source_files_properties(
"${CMAKE_CURRENT_BINARY_DIR}/log_header.h"
PROPERTIES GENERATED TRUE)
add_executable(logformat logformat.cc)
add_executable(logformat logger/logformat.cc)
target_link_libraries(logformat ${LIBTOKUPORTABILITY}_static)
add_custom_command(
@ -15,7 +15,7 @@ add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/log_print.cc"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/log_header.h"
COMMAND $<TARGET_FILE:logformat> .
DEPENDS logformat
DEPENDS logger/logformat
)
add_custom_target(
generate_log_code
@ -41,10 +41,10 @@ set(FT_SOURCES
loader/pqueue
leafentry
le-cursor
logcursor
logfilemgr
logger
log_upgrade
logger/logcursor
logger/logfilemgr
logger/logger
logger/log_upgrade
msg
msg_buffer
node

View file

@ -89,24 +89,24 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include <toku_portability.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdarg.h>
#include "cachetable.h"
#include <ft/log_header.h>
#include "checkpoint.h"
#include "log-internal.h"
#include "cachetable-internal.h"
#include <memory.h>
#include <toku_race_tools.h>
#include <portability/memory.h>
#include <portability/toku_race_tools.h>
#include <portability/toku_atomic.h>
#include <portability/toku_pthread.h>
#include <portability/toku_portability.h>
#include <portability/toku_stdlib.h>
#include <portability/toku_time.h>
#include <util/rwlock.h>
#include <util/status.h>
#include <util/context.h>
#include "ft/cachetable.h"
#include "ft/cachetable-internal.h"
#include "ft/checkpoint.h"
#include "ft/logger/log-internal.h"
#include "util/rwlock.h"
#include "util/status.h"
#include "util/context.h"
///////////////////////////////////////////////////////////////////////////////////
// Engine status

View file

@ -95,7 +95,7 @@ PATENT RIGHTS GRANT:
#include <fcntl.h>
#include "ft/serialize/block_table.h"
#include "ft/logger.h"
#include "ft/logger/logger.h"
#include "ft/txn.h"
#include "util/minicron.h"

View file

@ -133,8 +133,8 @@ PATENT RIGHTS GRANT:
#include "ft/cachetable.h"
#include "ft/ft.h"
#include "ft/log-internal.h"
#include "ft/logger.h"
#include "ft/logger/log-internal.h"
#include "ft/logger/logger.h"
#include "ft/checkpoint.h"
#include "util/frwlock.h"
#include "util/status.h"

View file

@ -208,7 +208,7 @@ basement nodes, bulk fetch, and partial fetch:
#include "ft/ft-internal.h"
#include "ft/msg.h"
#include "ft/leafentry.h"
#include "ft/log-internal.h"
#include "ft/logger/log-internal.h"
#include "ft/node.h"
#include "ft/serialize/block_table.h"
#include "ft/serialize/sub_block.h"

View file

@ -93,7 +93,7 @@ PATENT RIGHTS GRANT:
#include "ft/ft.h"
#include "ft/ft-cachetable-wrappers.h"
#include "ft/ft-internal.h"
#include "ft/log-internal.h"
#include "ft/logger/log-internal.h"
#include "ft/log_header.h"
#include "ft/node.h"
#include "ft/serialize/ft-serialize.h"

View file

@ -95,7 +95,7 @@ PATENT RIGHTS GRANT:
#include "ft/cachetable.h"
#include "ft/ft-ops.h"
#include "ft/log.h"
#include "ft/logger/log.h"
#include "ft/ybt.h"
typedef struct ft *FT;

View file

@ -106,7 +106,7 @@ PATENT RIGHTS GRANT:
#include "ft/loader/loader-internal.h"
#include "ft/loader/pqueue.h"
#include "ft/loader/dbufio.h"
#include "ft/log-internal.h"
#include "ft/logger/log-internal.h"
#include "ft/node.h"
#include "ft/serialize/block_table.h"
#include "ft/serialize/ft-serialize.h"

View file

@ -96,18 +96,18 @@ PATENT RIGHTS GRANT:
#include <sys/types.h>
#include <string.h>
#include <dirent.h>
#include "ft-internal.h"
#include "log.h"
#include "toku_list.h"
#include "logfilemgr.h"
#include "txn.h"
#include "txn_manager.h"
#include "rollback_log_node_cache.h"
#include <portability/toku_pthread.h>
#include "portability/toku_list.h"
#include "portability/toku_pthread.h"
#include "ft/ft-internal.h"
#include "ft/logger/log.h"
#include "ft/logger/logfilemgr.h"
#include "ft/txn.h"
#include "ft/txn_manager.h"
#include "ft/rollback_log_node_cache.h"
#include <util/memarena.h>
#include <util/omt.h>
#include "util/memarena.h"
#include "util/omt.h"
using namespace toku;
// Locking for the logger

View file

@ -98,7 +98,7 @@ PATENT RIGHTS GRANT:
#include "portability/memory.h"
#include "portability/toku_portability.h"
#include "ft/logger.h"
#include "ft/logger/logger.h"
#include "ft/rollback.h"
#include "ft/recover.h"
#include "ft/txn.h"

View file

@ -92,7 +92,7 @@ PATENT RIGHTS GRANT:
#include <ft/log_header.h>
#include "log-internal.h"
#include "logcursor.h"
#include "logger/logcursor.h"
#include "checkpoint.h"
static uint64_t footprint = 0; // for debug and accountability

View file

@ -90,7 +90,7 @@ PATENT RIGHTS GRANT:
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "log-internal.h"
#include "logcursor.h"
#include "logger/logcursor.h"
#include <limits.h>
#include <unistd.h>

View file

@ -89,9 +89,9 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "log-internal.h"
#include "logcursor.h"
#include "logfilemgr.h"
#include "logger/log-internal.h"
#include "logger/logcursor.h"
#include "logger/logfilemgr.h"
// for now, implement with singlely-linked-list
// first = oldest (delete from beginning)

View file

@ -854,7 +854,7 @@ int main (int argc, const char *const argv[]) {
fprintf2(cf, hf, "#ident \"Copyright (c) 2007-2013 Tokutek Inc. All rights reserved.\"\n");
fprintf2(cf, pf, "#include <stdint.h>\n");
fprintf2(cf, pf, "#include <sys/time.h>\n");
fprintf2(cf, pf, "#include <ft/log-internal.h>\n");
fprintf2(cf, pf, "#include <ft/logger/log-internal.h>\n");
fprintf(hf, "#include <ft/ft-internal.h>\n");
fprintf(hf, "#include <util/bytestring.h>\n");
fprintf(hf, "#include <util/memarena.h>\n");

View file

@ -96,7 +96,7 @@ PATENT RIGHTS GRANT:
#include "ft/serialize/block_table.h"
#include "ft/ft.h"
#include "ft/log-internal.h"
#include "ft/logger/log-internal.h"
#include "ft/txn_manager.h"
#include "ft/rollback_log_node_cache.h"

View file

@ -89,16 +89,15 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include <ft/log_header.h>
#include "ft.h"
#include "log-internal.h"
#include "logcursor.h"
#include "cachetable.h"
#include "checkpoint.h"
#include "txn_manager.h"
#include <util/omt.h>
#include "ft/cachetable.h"
#include "ft/checkpoint.h"
#include "ft/ft.h"
#include "ft/log_header.h"
#include "ft/logger/log-internal.h"
#include "ft/logger/logcursor.h"
#include "ft/txn_manager.h"
#include "util/omt.h"
int tokudb_recovery_trace = 0; // turn on recovery tracing, default off.

View file

@ -91,13 +91,13 @@ PATENT RIGHTS GRANT:
/* rollback and rollforward routines. */
#include <ft/log_header.h>
#include "ft.h"
#include "ft-ops.h"
#include "log-internal.h"
#include "xids.h"
#include "rollback-apply.h"
#include "ft/ft.h"
#include "ft/ft-ops.h"
#include "ft/log_header.h"
#include "ft/logger/log-internal.h"
#include "ft/xids.h"
#include "ft/rollback-apply.h"
// functionality provided by roll.c is exposed by an autogenerated
// header file, logheader.h

View file

@ -89,7 +89,7 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "ft/log-internal.h"
#include "ft/logger/log-internal.h"
#include "ft/rollback-apply.h"
static void

View file

@ -93,7 +93,7 @@ PATENT RIGHTS GRANT:
#include "ft/serialize/block_table.h"
#include "ft/ft.h"
#include "ft/log-internal.h"
#include "ft/logger/log-internal.h"
#include "ft/rollback-ct-callbacks.h"
static void rollback_unpin_remove_callback(CACHEKEY* cachekey, bool for_checkpoint, void* extra) {

View file

@ -95,7 +95,7 @@ PATENT RIGHTS GRANT:
#include "ft/ft.h"
#include "ft/ft-internal.h"
#include "ft/node.h"
#include "ft/log-internal.h"
#include "ft/logger/log-internal.h"
#include "ft/rollback.h"
#include "ft/serialize/block_table.h"
#include "ft/serialize/compress.h"

View file

@ -92,7 +92,7 @@ PATENT RIGHTS GRANT:
/* Dump the log from stdin to stdout. */
#include "ft/log_header.h"
#include "ft/logger.h"
#include "ft/logger/logger.h"
static void newmain (int count) {
int i;

View file

@ -91,7 +91,7 @@ PATENT RIGHTS GRANT:
// verify that the log file trimmer does not delete the log file containing the
// begin checkpoint when the checkpoint log entries span multiple log files.
#include "logcursor.h"
#include "logger/logcursor.h"
#include "test.h"
int

View file

@ -88,7 +88,7 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#include "logcursor.h"
#include "logger/logcursor.h"
#include "test.h"
// log a couple of timestamp entries and verify the log by walking

View file

@ -88,7 +88,7 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#include "logcursor.h"
#include "logger/logcursor.h"
#include "test.h"
// a logcursor in an empty directory should not find any log entries

View file

@ -88,7 +88,7 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#include "logcursor.h"
#include "logger/logcursor.h"
#include "test.h"
const int N = 2;

View file

@ -88,7 +88,7 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#include "logcursor.h"
#include "logger/logcursor.h"
#include "test.h"
const int N = 2;

View file

@ -88,7 +88,7 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#include "logcursor.h"
#include "logger/logcursor.h"
#include "test.h"
const int N = 2;

View file

@ -89,7 +89,7 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "test.h"
#include "logcursor.h"
#include "logger/logcursor.h"
int test_main(int argc, const char *argv[]) {
int r;

View file

@ -88,7 +88,7 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#include "logcursor.h"
#include "logger/logcursor.h"
#include "test.h"
static uint64_t now(void) {

View file

@ -88,8 +88,9 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "test.h"
#include "logfilemgr.h"
#include "ft/tests/test.h"
#include "ft/logger/logfilemgr.h"
int test_main(int argc __attribute__((unused)), const char *argv[] __attribute__((unused))) {
int r;

View file

@ -88,8 +88,8 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "test.h"
#include "logfilemgr.h"
#include "ft/tests/test.h"
#include "ft/logger/logfilemgr.h"
int test_main(int argc __attribute__((unused)), const char *argv[] __attribute__((unused))) {
int r;

View file

@ -110,8 +110,8 @@ PATENT RIGHTS GRANT:
#include "ft/ft-ops.h"
#include "ft/serialize/ft-serialize.h"
#include "ft/serialize/ft_node-serialize.h"
#include "ft/log-internal.h"
#include "ft/logger.h"
#include "ft/logger/log-internal.h"
#include "ft/logger/logger.h"
#include "ft/node.h"
#include "util/bytestring.h"

View file

@ -90,7 +90,7 @@ PATENT RIGHTS GRANT:
#include <toku_portability.h>
#include <string.h>
#include "logcursor.h"
#include "logger/logcursor.h"
#include "test.h"
#if defined(HAVE_LIMITS_H)

View file

@ -90,14 +90,14 @@ PATENT RIGHTS GRANT:
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "ft.h"
#include "txn.h"
#include "log-internal.h"
#include "checkpoint.h"
#include "ule.h"
#include "rollback-apply.h"
#include "txn_manager.h"
#include <util/status.h>
#include "ft/checkpoint.h"
#include "ft/ft.h"
#include "ft/logger/log-internal.h"
#include "ft/ule.h"
#include "ft/rollback-apply.h"
#include "ft/txn.h"
#include "ft/txn_manager.h"
#include "util/status.h"
///////////////////////////////////////////////////////////////////////////////////
// Engine status

View file

@ -89,8 +89,8 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include "log-internal.h"
#include "txn_child_manager.h"
#include "ft/logger/log-internal.h"
#include "ft/txn_child_manager.h"
//
// initialized a txn_child_manager,

View file

@ -89,16 +89,15 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#include <toku_race_tools.h>
#include "portability/toku_race_tools.h"
#include <util/omt.h>
#include "log-internal.h"
#include "txn.h"
#include "checkpoint.h"
#include "ule.h"
#include "txn_manager.h"
#include "rollback.h"
#include "ft/checkpoint.h"
#include "ft/logger/log-internal.h"
#include "ft/ule.h"
#include "ft/txn.h"
#include "ft/txn_manager.h"
#include "ft/rollback.h"
#include "util/omt.h"
bool garbage_collection_debug = false;

View file

@ -106,7 +106,7 @@ PATENT RIGHTS GRANT:
#include "ft/ft-internal.h"
#include "ft/leafentry.h"
#include "ft/logger.h"
#include "ft/logger/logger.h"
#include "ft/msg.h"
#include "ft/txn.h"
#include "ft/txn_manager.h"

View file

@ -103,7 +103,7 @@ PATENT RIGHTS GRANT:
#include <ft/leafentry.h>
#include <ft/ule.h>
#include <ft/xids.h>
#include <ft/log-internal.h>
#include <ft/logger/log-internal.h>
#include <ft/checkpoint.h>
#include <portability/toku_atomic.h>
#include "loader.h"

View file

@ -92,7 +92,7 @@ PATENT RIGHTS GRANT:
/* Is it feasible to run 4 billion transactions in one test in the regression tests? */
#include <db.h>
#include <sys/stat.h>
#include <ft/log.h>
#include <ft/logger/log.h>
#include <src/ydb_txn.h>
static void

View file

@ -97,7 +97,7 @@ PATENT RIGHTS GRANT:
#include <ft/cachetable.h>
#include <ft/cursor.h>
#include <ft/comparator.h>
#include <ft/logger.h>
#include <ft/logger/logger.h>
#include <ft/txn.h>
#include <util/growable_array.h>

View file

@ -104,7 +104,7 @@ const char *toku_copyright_string = "Copyright (c) 2007-2013 Tokutek Inc. All r
#include "ft/ft-flusher.h"
#include "ft/cachetable.h"
#include "ft/log.h"
#include "ft/logger/log.h"
#include "ft/checkpoint.h"
#include "ft/loader/loader.h"
#include "ft/log_header.h"