[Monetdb-developers] [Monetdb-pf-checkins] pathfinder/runtime pathfinder.mx, 1.270, 1.271

Stefan Manegold Stefan.Manegold at cwi.nl
Wed Nov 8 09:47:03 CET 2006


FYI:


Here's the status of `Mtest_pathfinder -r runtime/ testing/` of the CVS head
at three timestamps:

Tuesday, Nov 07 2006, 17:59 CET 
(tag information-functions_and_checkpointing-thread_before in pathfinder)

   90 out of 665 tests produced SIGNIFICANTLY different output


Tuesday, Nov 07 2006 23:59 CET
(tag XQuery_0-14_root in pathfinder; identical with initial XQuery_0-14
release branch and tag information-functions_and_checkpointing-thread_after)

  570 out of 665 tests produced SIGNIFICANTLY different output


Wednesday, Nov 08 2006 9:00 CET
(CVS head still/again idential with release branch)

  417 out of 665 tests produced SIGNIFICANTLY different output


Stefan


On Wed, Nov 08, 2006 at 01:29:34AM +0000, Peter Boncz wrote:
> Update of /cvsroot/monetdb/pathfinder/runtime
> In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5740
> 
> Modified Files:
> 	pathfinder.mx 
> Log Message:
> - fn:doc works sgain and that should clear up quite some tests in the testweb
> 
> 
> 
> Index: pathfinder.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
> retrieving revision 1.270
> retrieving revision 1.271
> diff -u -d -r1.270 -r1.271
> --- pathfinder.mx	8 Nov 2006 01:00:29 -0000	1.270
> +++ pathfinder.mx	8 Nov 2006 01:29:32 -0000	1.271
> @@ -63,7 +63,6 @@
>  .END pathfinder;
>  @mil
>  if (clientid() != 0) {
> -    drop("_pathfinder");
>      ERROR("pathfinder module must be loaded in Mserver console first.");
>  }
>  module(mapi);       # remote client access
> @@ -464,8 +463,30 @@
>  	.append("_qn_prefix_uri_loc")
>  	.append("_qn_histogram");
>  
> +PROC pf_checkpoint(BAT[void,str] commitBAT) : bit 
> +{
> +    if (count(commitBAT) = 0) return false;
> +    commitBAT := commitBAT.access(BAT_WRITE);
> +    commitBAT.append("xquery_catalog");
> +    commitBAT.append("xquery_seqs");
> +    commitBAT.append("xquery_snapshots");
> +    commitBAT.append("collection_name");
> +    commitBAT.append("collection_size");
> +    commitBAT.append("doc_name");
> +    commitBAT.append("doc_location");
> +    commitBAT.append("doc_collection");
> +    commitBAT.append("doc_timestamp");
> +    commitBAT.append("uri_lifetime");
> +    var ok := false;
> +    lock_set(pf_wal);
> +    CATCH(ok := subcommit(commitBAT));
> +    lock_unset(pf_wal);
> +    if (not(ok)) ERROR("XQDY0062: checkpoint failed, query aborted.\n");
> +    return true;
> +}
> +
>  # the logger background thread
> -PROC xquery_logmanager() : void {
> +PROC pf_logmanager() : void {
>      var cnt := 0;
>      while(true) {
>          if ((logger_changes(pf_logger) > 100000) and ((cnt :+= 1) <= 10)) { 
> @@ -478,7 +499,7 @@
>          sleep(90);  
>      }
>  }
> -fork(xquery_logmanager());
> +fork(pf_logmanager());
>  
>  # the set of document collections (may only be accessed holding pf_short)
>  var collection_name;  # bat[oid,str] collection name 
> @@ -513,9 +534,8 @@
>      doc_location    := new(oid,str).persists(true).rename("doc_location");
>      doc_timestamp   := new(oid,timestamp).persists(true).rename("doc_timestamp");
>      uri_lifetime    := new(str,lng).persists(true).rename("uri_lifetime");
> -}
> -if (not(doc_collection.exist(TEMP_DOC))) {
>      doc_collection.insert(TEMP_DOC, DOCID_MIN); # hack: store next oid as in invalid TEMP_DOC tuple
> +    pf_checkpoint(bat(void,str).append("uri_lifetime"));
>  }
>  
>  # runtime collection acccess control (TRANSIENT)
> @@ -1819,39 +1839,6 @@
>  } 
>  
>  
> - at - commit stuff 
> -
> -Update queries use the WAL for committing their changes rapidly in a single bulk I/O.
> -They leave the modified master BATs dirty.
> -
> -A checkpointing mechanism flushes the BATs to disk periodically (or forced when under 
> -memory pressure -- but performance-wise it is better to do it pro-actively).
> -
> -The shredding of new documents uses checkpointing (i.e. direct flush and no WAL) 
> -directly. This is a reason why update-queries may not contain fn:add_doc() or fn:del_doc()
> -statements; such queries would need two different kinds of commits, making them non-atomic.
> - at mil
> -PROC pf_checkpoint(BAT[void,str] commitBAT) : bit 
> -{
> -    if (count(commitBAT) = 0) return false;
> -    commitBAT := commitBAT.access(BAT_WRITE);
> -    commitBAT.append("xquery_catalog");
> -    commitBAT.append("xquery_seqs");
> -    commitBAT.append("xquery_snapshots");
> -    commitBAT.append("collection_name");
> -    commitBAT.append("collection_size");
> -    commitBAT.append("doc_name");
> -    commitBAT.append("doc_location");
> -    commitBAT.append("doc_collection");
> -    commitBAT.append("doc_timestamp");
> -    commitBAT.append("uri_lifetime");
> -    var ok := false;
> -    lock_set(pf_wal);
> -    CATCH(ok := subcommit(commitBAT));
> -    lock_unset(pf_wal);
> -    if (not(ok)) ERROR("XQDY0062: checkpoint failed, query aborted.\n");
> -    return true;
> -}
>  
>  
>  @- adding documents
> @@ -2147,9 +2134,9 @@
>                         oid coll_oid, 
>                         BAT[lock,bat] runtime,
>                         oid docid_base, 
> -                       bit doCommit, 
>                         lng pageFree, 
>                         timestamp ts, 
> +                       bit doCommit, 
>                         Stream s,
>                         lng wsid) : oid
>  {
> @@ -2266,7 +2253,7 @@
>          shred_into_docBAT(docBAT, 
>                            idx.leftfetchjoin(idx_locations),
>                            idx.leftfetchjoin(idx_names),
> -                          colname, coll_oid, runtime, oid_nil, true, percentage, timestamp_nil, s, wsid);
> +                          colname, coll_oid, runtime, oid_nil, percentage, timestamp_nil, true, s, wsid);
>  
>  	if (isnil(coll_oid)) {
>              # register new bats with the logger
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Monetdb-pf-checkins mailing list
> Monetdb-pf-checkins at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
> 
> 

-- 
| Dr. Stefan Manegold | mailto:Stefan.Manegold at cwi.nl |
| CWI,  P.O.Box 94079 | http://www.cwi.nl/~manegold/  |
| 1090 GB Amsterdam   | Tel.: +31 (20) 592-4212       |
| The Netherlands     | Fax : +31 (20) 592-4312       |




More information about the developers-list mailing list