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

Modified Files:
      Tag: XQuery_0-24
        pathfinder.mx 
Log Message:

Step 1 of my (not yet finished/successful) attempt to fix
[ 1976341 ] XQ: leftovers after deleting document
https://sourceforge.net/tracker/index.php?func=detail&aid=1976341&group_id=56967&atid=482468


Fixed and simplified the implementation of "pf_logmanager()".
The strategy should still be the same, i.e.,
flush the log at most every 5 minutes,
and only if there have been at least 100000 changes since the last flush;
check every 30 seconds, whether a flush is required.


U pathfinder.mx
Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.416.2.5
retrieving revision 1.416.2.6
diff -u -d -r1.416.2.5 -r1.416.2.6
--- pathfinder.mx       4 Jun 2008 17:41:54 -0000       1.416.2.5
+++ pathfinder.mx       5 Jun 2008 21:18:51 -0000       1.416.2.6
@@ -675,19 +675,15 @@
 
 
 # the logger background thread
-var logger_base := 0;
 PROC pf_logmanager() : void {
-    logger_base := logger_changes(pf_logger);
     var cnt := 0;
     while(true) {
         var changes := logger_changes(pf_logger);
-        var delta := changes - logger_base;
         if (((cnt :+= 1) % 10) = 0) { 
             cleantmpdir((msec() / 1000LL) - 3600LL);
         }
-        if (((delta < 0) or (delta > 100000)) and (cnt > 10)) { 
+        if ((changes > 100000) and (cnt > 10)) { 
             pf_logflush(0LL);
-            logger_base = changes;
             cnt := 0;
         } 
         sleep(30);  


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

Reply via email to