Update of /cvsroot/monetdb/pathfinder/modules/pftijah
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23163
Modified Files:
Tag: XQuery_0-18
pftijah.mx
Log Message:
- use isnil(CATCH(bat(name))) instead of view_bbp_name.reverse().exist(name)
REASON: view_bbp_name() takes all BBP locks that exist, and enormous stress
on the throughput
Index: pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/pftijah.mx,v
retrieving revision 1.134.2.11
retrieving revision 1.134.2.12
diff -u -d -r1.134.2.11 -r1.134.2.12
--- pftijah.mx 12 Jun 2007 12:52:28 -0000 1.134.2.11
+++ pftijah.mx 12 Jun 2007 18:56:19 -0000 1.134.2.12
@@ -205,7 +205,7 @@
##
var returnAllElements := true;
-if (view_bbp_name().reverse().exist("tj_collName")) {
+if (isnil(CATCH(bat("tj_collName").count()))) {
if (bat("tj_collName").count() > 0) {
var name := bat("tj_collName").fetch(0);
# tj_setCollName(name);
@@ -260,7 +260,7 @@
var tjc;
- if (view_bbp_name().reverse().exist("tj_collName")) {
+ if (isnil(CATCH(bat("tj_collName").count()))) {
tjc := bat("tj_collName");
} else {
tjc := new(oid,str);
@@ -489,7 +489,7 @@
var err := CATCH({
if ( verbose ) printf("#TJ tj_init_collection(\"%s\")
called.\n",ftiName);
- if (not(view_bbp_name().reverse().exist("tj_collName"))) {
+ if (not(isnil(CATCH(bat("tj_collName").count())))) {
tj_init_global(new(str,str),false); # just in case
}
if (bat("tj_collName").reverse().exist(ftiName)) {
@@ -719,8 +719,8 @@
var err := CATCH({
if ( verbose ) printf("#TJ:tj_delete_collection(\"%s\")
called.\n",ftiName);
- if (not(view_bbp_name().reverse().exist("tj_collName"))) {
- qERROR("tj_delete_collection: pftijah not initialized.\n");
+ if (not(isnil(CATCH(bat("tj_collName").count())))) {
+ ERROR("tj_delete_collection: pftijah not initialized.\n");
}
if (not(bat("tj_collName").reverse().exist(ftiName))) {
ERROR("tj_delete_collection, pftijah collection does not exist:
%s\n",ftiName);
@@ -752,7 +752,7 @@
bat("tj_" + ftiName + "_size"+fpfx).persists(false);
}
bat("tj_" + ftiName + "_fragments").persists(false);
- if (view_bbp_name().reverse().exist("tj_" + ftiName + "_TermIndex")) {
+ if (isnil(CATCH(bat("tj_" + ftiName + "_TermIndex").count()))) {
bat("tj_" + ftiName + "_TermIndex").persists(false);
bat("tj_" + ftiName + "_Terms").persists(false);
bat("tj_" + ftiName + "_TagIndex").persists(false);
@@ -787,7 +787,7 @@
tjCollBat.append("tj_" + ftiName + "_tid" + str(int($t)));
tjCollBat.append("tj_" + ftiName + "_size"+ str(int($t)));
}
- if (view_bbp_name().reverse().exist("tj_" + ftiName + "_TermIndex")) {
+ if (isnil(CATCH(bat("tj_" + ftiName + "_TermIndex").count()))) {
tjCollBat.append("tj_" + ftiName + "_Terms");
tjCollBat.append("tj_" + ftiName + "_Tags");
tjCollBat.append("tj_" + ftiName + "_TermIndex");
@@ -800,7 +800,7 @@
# a single [void,bat] bat
PROC _tj_collection(str ftiName) : BAT[str, bat]
{
- if (not(view_bbp_name().reverse().exist("tj_" + ftiName + "_param"))) {
+ if (not(isnil(CATCH(bat("tj_" + ftiName + "_param").count())))) {
ERROR("_tj_collection(): collection(\""+ftiName+"\") does not
exist!\n");
}
var tjCollBat := new(str,bat);
@@ -827,7 +827,7 @@
tjCollBat.insert("_pfpre", bat("tj_" + ftiName + "_pfpre"));
tjCollBat.insert("_fragments", bat("tj_" + ftiName + "_fragments"));
- if (view_bbp_name().reverse().exist("tj_" + ftiName + "_TermIndex")) {
+ if (isnil(CATCH(bat("tj_" + ftiName + "_TermIndex").count()))) {
tjCollBat.insert("_Terms", bat("tj_" + ftiName + "_Terms"));
tjCollBat.insert("_Tags", bat("tj_" + ftiName + "_Tags"));
tjCollBat.insert("_TermIndex", bat("tj_" + ftiName + "_TermIndex"));
@@ -1113,7 +1113,7 @@
# INCOMPLETE: henning, what should I do about this (no locking impl).
PROC tj_setBackgroundCollName(str name, BAT[oid,str] qenv) : BAT[void,str] :=
{
- if (not(view_bbp_name().reverse().exist("tj_collName"))) {
+ if (not(isnil(CATCH(bat("tj_collName").count())))) {
tj_global_init();
}
if (not(bat("tj_collName").reverse().exist(name))) {
@@ -1156,7 +1156,7 @@
PROC tj_is_indexed(str collName) : bit :=
{
- if (view_bbp_name().reverse().exist("tj_pfc_fti_dep")) {
+ if (isnil(CATCH(bat("tj_pfc_fti_dep").count()))) {
if ( bat("tj_pfc_fti_dep_star").count() > 0 ) {
# eg. all collections are indexed
return TRUE;
@@ -1174,7 +1174,7 @@
BAT[void,lng] int_values,
BAT[void,str] str_values) : void
{
- if (view_bbp_name().reverse().exist("tj_pfc_fti_dep")) {
+ if (isnil(CATCH(bat("tj_pfc_fti_dep").count()))) {
if ( bat("tj_pfc_fti_dep").count() > 0 ) {
if ( verbose ) printf("#TJ:tj_play_doc_tape() start.\n");
var IDoid := [and]([lng](item.mirror()),
3LL).ord_uselect(0LL).hmark([EMAIL PROTECTED]);
@@ -3159,7 +3159,7 @@
tids.access(BAT_READ);
# incremental index merge
- if (view_bbp_name().reverse().exist("tj_" + ftiName + "_TermIndex"))
+ if (isnil(CATCH(bat("tj_" + ftiName + "_TermIndex").count())))
{
var replaceBats := collBat.find("replaceBats");
var tmp := tids.kdiff(collBat.find("_pfpre"));
-------------------------------------------------------------------------
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