Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1129/compiler/mil
Modified Files:
Tag: xrpcdemo
milprint_summer.c
Log Message:
Support for 2-phase commit.
The code assumes that there is a variable xprc_qid with value != ""
when we're in a P2P situation.
Instead of play_update_tape (which is unchanged), we call
collect_update_tape to collect all updates in the working set. The
necessary bats are always created when we're doing an update (see
ws_udpate).
Once all updates have been collected, we assume that the function
execute_update_tape is called with just the ws as parameter. This
function will get the collected updates and pass them to UpdateTape
(the algebra version of play_update_tape).
Instead of writing the commit record, we call a function
do_2phase_commit (no arguments--feel free to change) to do the work
needed for a two-phase commit. This function needs to be implemented
(there is a stub).
This code is totally untested (except that the main code of
collect_update_tape does transform the update tape into something that
we can store).
U milprint_summer.c
Index: milprint_summer.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milprint_summer.c,v
retrieving revision 1.419.4.2
retrieving revision 1.419.4.3
diff -u -d -r1.419.4.2 -r1.419.4.3
--- milprint_summer.c 25 May 2008 22:55:06 -0000 1.419.4.2
+++ milprint_summer.c 2 Jun 2008 14:07:51 -0000 1.419.4.3
@@ -11693,7 +11693,11 @@
" if ((genType.search(\"none\") < 0) or (genType.search(\"xml\") >=
0))\n"\
"
print_result(genType,moduleNS,method,ws,tunique(iter),constant2bat(iter),item.materialize(ipik),constant2bat(kind),int_values,dbl_values,str_values);\n"
#define PF_STOPMIL_UPDATE_BODY\
- " play_update_tape(ws, item.materialize(ipik),
kind.materialize(ipik), int_values, str_values);\n"
+ " if (xrpc_qid != "") {\n"\
+ " collect_update_tape(ws, item.materialize(ipik),
kind.materialize(ipik), int_values, str_values);\n"\
+ " } else {\n"\
+ " play_update_tape(ws, item.materialize(ipik),
kind.materialize(ipik), int_values, str_values);\n"\
+ " }\n"
#define PF_STOPMIL_DOCMGT_BODY\
" play_doc_tape(ws, item.materialize(ipik), kind.materialize(ipik),
int_values, str_values);\n"
#define PF_STOPMIL_RDONLY PF_STOPMIL_START\
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins