Commit 2acee0d8 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Create code to compute the size of a rollback entry. Addresses #711.

git-svn-id: file:///svn/tokudb@3490 c7de825b-a66e-492c-adef-691d508d4ae1
parent b85a5fdc
......@@ -509,6 +509,17 @@ void generate_rollbacks (void) {
fprintf(cf, " txn->newest_logentry = v;\n");
fprintf(cf, " return 0;\n}\n");
}));
DO_ROLLBACKS(lt, ({
fprintf2(cf, hf, "int toku_logger_rollback_fsize_%s (", lt->name);
int count=0;
DO_FIELDS(ft, lt, fprintf2(cf, hf, "%s%s %s", (count++>0)?", ":"", ft->type, ft->name));
fprintf(hf, ");\n");
fprintf(cf, ") {\n");
fprintf(cf, " return 1 // the cmd");
DO_FIELDS(ft, lt,
fprintf(cf, "\n + toku_logsizeof_%s(%s)", ft->type, ft->name));
fprintf(cf, ";\n}\n");
}));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment