Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9159/runtime
Modified Files:
Tag: xrpcdemo
pathfinder.mx pf_support.mx serialize.mx xrpc_client.mx
Log Message:
Index: compiler/mil/milprint_summer.c
- make sure try variable is not optimized away
Index: compiler/semantics/functions.c
- fix the atURI property as set to functions by pf
Index: runtime/pathfinder.mx
- do not restart any XRPC update call (to avoid restarts
in circular queries going into exclusive mode, thus
causing deadlock)
Index: runtime/pf_support.mx
- bad bug in docsused
Index: runtime/serialize.mx
- bug in serialization
Index: runtime/xrpc_client.mx
- do parse the response message of update queries
(otherwise we loose the participant info)
Index: runtime/xrpc/demo/demo-xrpcmod.xq
- some fixes in the demo file
(note: it is not consistent with the texts in the GUI)
U xrpc_client.mx
Index: xrpc_client.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc_client.mx,v
retrieving revision 1.45.4.14
retrieving revision 1.45.4.15
diff -u -d -r1.45.4.14 -r1.45.4.15
--- xrpc_client.mx 12 Jun 2008 09:54:55 -0000 1.45.4.14
+++ xrpc_client.mx 12 Jun 2008 14:47:29 -0000 1.45.4.15
@@ -156,12 +156,11 @@
var time_xrpcClntDeSeria := usec();
if (isnil(rpc_err)) {
- if (not(updCall)) {
- lock_set(rpcres_lock);
- rpc_results.insert(local_name,rpc_res);
- rpc_iter.append(iter_dst.hmark([EMAIL PROTECTED]));
- lock_unset(rpcres_lock);
- }
+ lock_set(rpcres_lock);
+ rpc_results.insert(local_name,rpc_res);
+ rpc_iter.append(iter_dst.hmark([EMAIL PROTECTED]));
+ lock_unset(rpcres_lock);
+
time_xrpcClntDeSeria := usec() - time_xrpcClntDeSeria;
if (genType.search("timing") >= 0) {
printf("XRPC_Client_DeSerialisation (insert_rpc_res): %lld
microsec\n",
@@ -189,13 +188,6 @@
var res_kind := bat(void,int).seqbase([EMAIL PROTECTED]);
var res_bats := bat(void,bat,4).seqbase([EMAIL PROTECTED]);
- if(updCall){
- # If called function is an updating function, there is no
- # results to retrieve. So, return empty BATs.
- res_bats.append(res_iter).append(res_item).append(res_kind);
- return res_bats.access(BAT_READ);
- }
-
if(count(rpc_results) = 0) {
ERROR("doLoopLiftedRPC: execution failed at all destinations:\n%s\n",
rpc_errors);
} else if(rpc_errors != "") {
@@ -296,17 +288,15 @@
# add result of this iteration to result BATs
var time_xrpcClntDeSeriaStart := usec();
if (isnil(rpc_err)) {
- if (updCall != 1) {
- var rpc_oid := ws_opencoll(ws, rpc_res, local_name, TEMP_DOC);
- var res := get_rpc_res(rpc_oid, ws, int_values, dbl_values,
str_values);
- if (isnil(res_bats)){
- res_bats := res;
- } else {
- # merge results of this iteration into existing results.
- res_bats := merged_union(res_bats.fetch(0), res.fetch(0),
- res_bats.fetch(1), res.fetch(1),
- res_bats.fetch(2), res.fetch(2));
- }
+ var rpc_oid := ws_opencoll(ws, rpc_res, local_name, TEMP_DOC);
+ var res := get_rpc_res(rpc_oid, ws, int_values, dbl_values,
str_values);
+ if (isnil(res_bats)){
+ res_bats := res;
+ } else {
+ # merge results of this iteration into existing results.
+ res_bats := merged_union(res_bats.fetch(0), res.fetch(0),
+ res_bats.fetch(1), res.fetch(1),
+ res_bats.fetch(2), res.fetch(2));
}
} else {
# We do not want to discard results from other destinations
@@ -323,17 +313,13 @@
}
var time_xrpcClntDeSeriaStart := usec();
- if (not(updCall)){
- # If called function is an updating function, there is no
- # results to retrieve. So, return empty BATs.
- var res_iter := bat(void,oid).seqbase([EMAIL PROTECTED]);
- var res_item := bat(void,oid).seqbase([EMAIL PROTECTED]);
- var res_kind := bat(void,int).seqbase([EMAIL PROTECTED]);
+ var res_iter := bat(void,oid).seqbase([EMAIL PROTECTED]);
+ var res_item := bat(void,oid).seqbase([EMAIL PROTECTED]);
+ var res_kind := bat(void,int).seqbase([EMAIL PROTECTED]);
- res_bats := bat(void,bat,4).seqbase([EMAIL PROTECTED]);
- res_bats.append(res_iter).append(res_item).append(res_kind);
- res_bats.access(BAT_READ);
- }
+ res_bats := bat(void,bat,4).seqbase([EMAIL PROTECTED]);
+ res_bats.append(res_iter).append(res_item).append(res_kind);
+ res_bats.access(BAT_READ);
time_xrpcClntDeSeria := time_xrpcClntDeSeria + (usec() -
time_xrpcClntDeSeriaStart);
@@ -722,6 +708,7 @@
int ret;
buffer *resp;
BAT *shredBAT;
+ (void) updCall;
/* Create buffer for the RPC response message */
resp = buffer_create(MAX_BUF_SIZE);
@@ -790,13 +777,11 @@
return NULL;
}
- if (!updCall) {
- if(shred(shredBAT, NULL, NULL, in, 0, NULL, NULL, NULL) ==GDK_FAIL) {
- GDKerror("response2bat: invalid XRPC response received\n");
- BBPreclaim(shredBAT);
- buffer_destroy(resp);
- return NULL;
- }
+ if(shred(shredBAT, NULL, NULL, in, 0, NULL, NULL, NULL) ==GDK_FAIL) {
+ GDKerror("response2bat: invalid XRPC response received\n");
+ BBPreclaim(shredBAT);
+ buffer_destroy(resp);
+ return NULL;
}
/* Stop timing Client DeSerialisation */
time_xrpcClntDeSeria = GDKusec() - time_xrpcClntDeSeria;
@@ -834,7 +819,7 @@
BAT *dec_values,
BAT *str_values)
{
- BATiter fun_itemi, fun_kindi;
+ BATiter fun_itemi = bat_iterator(fun_item), fun_kindi =
bat_iterator(fun_kind);
int ret = -1;
buffer *b = NULL;
stream *bs = NULL;
U pathfinder.mx
Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.416.2.1.2.14
retrieving revision 1.416.2.1.2.15
diff -u -d -r1.416.2.1.2.14 -r1.416.2.1.2.15
--- pathfinder.mx 10 Jun 2008 10:04:43 -0000 1.416.2.1.2.14
+++ pathfinder.mx 12 Jun 2008 14:47:28 -0000 1.416.2.1.2.15
@@ -1504,12 +1504,14 @@
if (not(isnil(err))) ws_log(ws, err);
if (xrpc_qid = "") {
ws_destroy(ws);
- return 1;
+ } else {
+ lock_set(xrpc_lock);
+ CATCH(_ws_xrpc_end(xrpc_qid, err));
+ lock_unset(xrpc_lock);
}
- lock_set(xrpc_lock);
- CATCH(_ws_xrpc_end(xrpc_qid, err));
- lock_unset(xrpc_lock);
- return 2; # do not auto-restart 2PC transactions ever
+ # do not auto-restart XRPC updates (deadlock danger)
+ if (xrpc_method != "") return 2;
+ return 1;
}
PROC ws_create(int update) : BAT[void,bat]
U serialize.mx
Index: serialize.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/serialize.mx,v
retrieving revision 1.109.4.10
retrieving revision 1.109.4.11
diff -u -d -r1.109.4.10 -r1.109.4.11
--- serialize.mx 11 Jun 2008 17:32:52 -0000 1.109.4.10
+++ serialize.mx 12 Jun 2008 14:47:29 -0000 1.109.4.11
@@ -1724,10 +1724,10 @@
ctx->xrpc_qid = xrpc_qid;
ctx->xrpc_caller = xrpc_caller;
ctx->xrpc_mode = xrpc_mode;
- ctx->xrpc_seqnr = *xrpc_seqnr;
- ctx->xrpc_updating = *xrpc_updating;
- ctx->xrpc_timeout = *xrpc_timeout;
- ctx->time_exec = *time_exec;
+ ctx->xrpc_seqnr = xrpc_seqnr?*xrpc_seqnr:0;
+ ctx->xrpc_updating = xrpc_updating?*xrpc_updating:0;
+ ctx->xrpc_timeout = xrpc_timeout?*xrpc_timeout:0;
+ ctx->time_exec = time_exec?*time_exec:0;
curcnt = 0;
maxcnt = BATcount (item);
U pf_support.mx
Index: pf_support.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v
retrieving revision 1.299.4.7
retrieving revision 1.299.4.8
diff -u -d -r1.299.4.7 -r1.299.4.8
--- pf_support.mx 11 Jun 2008 07:28:22 -0000 1.299.4.7
+++ pf_support.mx 12 Jun 2008 14:47:28 -0000 1.299.4.8
@@ -8461,7 +8461,7 @@
BUNins(*res, &docpre, &docid[j], FALSE);
/* skip all nodes of this document */
- docpre = docpre + size[docpre];
+ docpre = docpre + size[docpre] + 1;
for (delta = (n-i) >> 4; delta > 40; delta >>= 4)
while (i+delta < n && * (oid *) BUNtail(inputi, i+delta) <= docpre)
i += delta;
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins