Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7986

Modified Files:
      Tag: XQuery_0-22
        pathfinder.mx 
Log Message:
Add overlapping working sets to ws_overlaps_ws *before* cleaning up
page_ws (which uses ws_overlaps_ws).

This seems to fix bug [ 1896755 ] XQ: updates under stress.


Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.399.2.6
retrieving revision 1.399.2.7
diff -u -d -r1.399.2.6 -r1.399.2.7
--- pathfinder.mx       14 Mar 2008 19:23:44 -0000      1.399.2.6
+++ pathfinder.mx       20 Mar 2008 15:51:21 -0000      1.399.2.7
@@ -1484,6 +1484,8 @@
         }
     }
     ws_free(ws_id(ws)); # deregister working set from meta tables
+    if (ws_log_active)
+        ws_log(ws, "===================== END TRANSACTION");
 }
 
 PROC __ws_opencoll(BAT[void,BAT] ws,
@@ -1721,6 +1723,11 @@
     var runtime := _runtime_get(colname);
 
     if (and(wsid, WSID_UPDATE) != 0LL) {
+        # all queries using colname constitute new dependencies
+        var dep := _ws_pinnedcoll(wsid, colname);
+        ws_overlaps_ws.insert(dep);           # A overlaps B
+        ws_overlaps_ws.insert(reverse(dep));  # B overlaps A (overlapping is 
reflexive)
+
         # clean up the query change lists (pages, attributes) by removing no 
longer overlapping queries
         if (count(runtime) > RT_ATTR_WS) {
             var page_ws := runtime.fetch(RT_PAGE_WS);
@@ -1733,11 +1740,6 @@
                 attr_ws.deleteBuns(tdiff(attr_ws, all_ws));
             }
         }
-
-        # all other queries using colname now constitute new dependencies
-        var dep := _ws_pinnedcoll(wsid, colname);
-        ws_overlaps_ws.insert(dep);           # A overlaps B
-        ws_overlaps_ws.insert(reverse(dep));  # B overlaps A (overlapping is 
reflexive)
     }
 
     # index memory control, done when a persistent collection is opened for 
the first time  


-------------------------------------------------------------------------
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

Reply via email to