Update of /cvsroot/monetdb/pathfinder/modules/pftijah
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20087
Modified Files:
pftijah.mx
Log Message:
- Experimental update to try to make pftijah more robust for crashing. This
update continues removing index files when some files are not there.
U pftijah.mx
Index: pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/pftijah.mx,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -d -r1.210 -r1.211
--- pftijah.mx 21 Feb 2009 09:57:47 -0000 1.210
+++ pftijah.mx 24 Feb 2009 14:52:57 -0000 1.211
@@ -267,6 +267,14 @@
}
}
+# safe bat removal
+PROC _tj_safe_remove(str batName) : void := {
+ var err := CATCH({
+ bat(batName).persists(false);
+ });
+ if (not(isnil(err))) printf("#IGNORING: " + err);
+}
+
#
# Hash utility functions
#
@@ -464,13 +472,13 @@
tj_delete_collection($t,false);
}
if ( GLOBAL_TTBAT ) {
- bat(_tj_TermBat("")).persists(false);
- bat(_tj_TagBat("")).persists(false);
- bat(_tj_RTagBat("")).persists(false);
+ _tj_safe_remove(_tj_TermBat(""));
+ _tj_safe_remove(_tj_TagBat(""));
+ _tj_safe_remove(_tj_RTagBat(""));
}
- bat("tj_collName").persists(false);
- bat("tj_pfc_fti_dep").persists(false);
- bat("tj_pfc_fti_dep_star").persists(false);
+ _tj_safe_remove("tj_collName");
+ _tj_safe_remove("tj_pfc_fti_dep");
+ _tj_safe_remove("tj_pfc_fti_dep_star");
var globals := new(void,str).seqbase(0...@0);
if ( GLOBAL_TTBAT ) {
globals.append(_tj_TermBat(""));
@@ -608,10 +616,10 @@
while (frag_offset < frag_last)
{
var bn := "tj_" + ftiName + "_tid" + str(frag_offset);
- bat(bn).persists(FALSE);
+ _tj_safe_remove(bn);
extra_del_bat.append(bn);
bn := "tj_" + ftiName + "_size" + str(frag_offset);
- bat(bn).persists(FALSE);
+ _tj_safe_remove(bn);
extra_del_bat.append(bn);
frag_offset :+= 1;
}
@@ -712,10 +720,10 @@
}
if ( rebuild ) {
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);
- bat("tj_" + ftiName + "_Tags").persists(false);
+ _tj_safe_remove("tj_" + ftiName + "_TermIndex");
+ _tj_safe_remove("tj_" + ftiName + "_Terms");
+ _tj_safe_remove("tj_" + ftiName + "_TagIndex");
+ _tj_safe_remove("tj_" + ftiName + "_Tags");
}
}
});
@@ -881,30 +889,30 @@
lock_set(coll_lock);
var err := CATCH({
if ( not(GLOBAL_TTBAT) ) {
- bat(_tj_TermBat(ftiName)).persists(false);
- bat(_tj_TagBat(ftiName)).persists(false);
- bat(_tj_RTagBat(ftiName)).persists(false);
+ _tj_safe_remove(_tj_TermBat(ftiName));
+ _tj_safe_remove(_tj_TagBat(ftiName));
+ _tj_safe_remove(_tj_RTagBat(ftiName));
}
- bat("tj_" + ftiName + "_doc_name").persists(false);
- bat("tj_" + ftiName + "_doc_firstpre").persists(false);
- bat("tj_" + ftiName + "_param").persists(false);
- bat("tj_" + ftiName + "_pfpre").persists(false);
- bat("tj_" + ftiName + "_conceptdict").persists(false);
- bat("tj_" + ftiName + "_concept_tid").persists(false);
- bat("tj_" + ftiName + "_concept_elem").persists(false);
- bat("tj_" + ftiName + "_concept_score").persists(false);
+ _tj_safe_remove("tj_" + ftiName + "_doc_name");
+ _tj_safe_remove("tj_" + ftiName + "_doc_firstpre");
+ _tj_safe_remove("tj_" + ftiName + "_param");
+ _tj_safe_remove("tj_" + ftiName + "_pfpre");
+ _tj_safe_remove("tj_" + ftiName + "_conceptdict");
+ _tj_safe_remove("tj_" + ftiName + "_concept_tid");
+ _tj_safe_remove("tj_" + ftiName + "_concept_elem");
+ _tj_safe_remove("tj_" + ftiName + "_concept_score");
bat("tj_" + ftiName + "_fragments")@batloop() {
var fpfx := str(int($h));
- bat("tj_" + ftiName + "_tid"+fpfx).persists(false);
- bat("tj_" + ftiName + "_size"+fpfx).persists(false);
+ _tj_safe_remove("tj_" + ftiName + "_tid"+fpfx);
+ _tj_safe_remove("tj_" + ftiName + "_size"+fpfx);
}
bat("tj_" + ftiName + "_fragments").persists(false);
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);
- bat("tj_" + ftiName + "_TagSize").persists(false);
- bat("tj_" + ftiName + "_Tags").persists(false);
+ _tj_safe_remove("tj_" + ftiName + "_TermIndex");
+ _tj_safe_remove("tj_" + ftiName + "_Terms");
+ _tj_safe_remove("tj_" + ftiName + "_TagIndex");
+ _tj_safe_remove("tj_" + ftiName + "_TagSize");
+ _tj_safe_remove("tj_" + ftiName + "_Tags");
}
delete_pfc_fti(ftiName);
subcommit(_tj_collection_str(ftiName));
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins