Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16:/tmp/cvs-serv30946
Modified Files:
pathfinder.mx
Log Message:
Fixed various bugs that surfaced in TPoX testing.
- index maintenance must take into account that indexes for frequent
values are not stored;
- access to ws_overlaps_ws must happen with short lock held.
Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.352
retrieving revision 1.353
diff -u -d -r1.352 -r1.353
--- pathfinder.mx 27 Apr 2007 13:36:11 -0000 1.352
+++ pathfinder.mx 1 May 2007 13:21:49 -0000 1.353
@@ -2053,6 +2053,10 @@
var vxd := runtime.fetch(RT_VX_HSH_NID_DEL);
var vx_flush_deletes := ((count(vxd)*8) > count(vxm));
+ # nsloc index only contains qn-s from unq (ignore the rest)
+ ins_qn_nid := ins_qn_nid.kintersect(unq);
+ del_qn_nid := del_qn_nid.kintersect(unq);
+
if (coast_clear) {
# coast is clear, unite als ins, all del and apply them to the master
ins.insert(ins_qn_nid);
@@ -2069,22 +2073,23 @@
# the length is often |N|/8, i.e. linear in #nodes (*really* long)
# As the collision list is singly linked, deleting in the middle
# requires a traverse.
- # Thus, we avoid deleting, rather kdiff it and replace the entire
- # bat in bulk.
- var stay := reverse(reverse(idx).kdiff(reverse(del)));
- idx.delete().insert(stay);
+ idx.accdel("hash");
+ idx.deleteBuns(del);
del.delete();
}
idx.accbuild("hash"); # the hash table on qn ensures fast nsloc lookup
# do the same for value index
+ var ignores := vxm.uselect(oid_nil);
vxi.insert(ins_vx);
+ vxd.insert(del_vx);
+ vxi.delete(ignores); # ignore hash-codes marked nil (too frequent)
+ vxd.delete(ignores); # idem
vxm.insert(vxi);
vxi.delete();
- vxd.insert(del_vx);
if (vx_flush_deletes) {
- var stay := reverse(reverse(vxm).kdiff(reverse(vxd)));
- vxi.delete().insert(stay);
+ vxm.accdel("hash");
+ vxm.deleteBuns(vxd);
vxd.delete();
}
vxm.accbuild("hash"); # the hash table on (qn,str) code ensures fast
value lookup
@@ -2511,7 +2516,12 @@
BAT[void,oid] modified_attr) : void
{
var wsid := ws_id(ws);
- var overlap := reverse(ws_overlaps_ws).uselect(wsid).kunique().mirror();
+ lock_set(pf_short);
+ var overlap;
+ var err := CATCH(overlap :=
reverse(ws_overlaps_ws).uselect(wsid).kunique().mirror());
+ lock_unset(pf_short);
+ if (not(isnil(err)))
+ ERROR(err);
var runtime := ws.fetch(CONT_RUNTIME).fetch(cont);
var page_ws := runtime.fetch(RT_PAGE_WS);
var attr_ws := runtime.fetch(RT_ATTR_WS);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins