[commit] r1974 - trunk/GME/Mga
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Mon Jul 23 12:13:59 CDT 2012
Author: ksmyth
Date: Mon Jul 23 12:13:58 2012
New Revision: 1974
Log:
Fix MgaFCO stale attribute cache ("apool") after transaction abort. Bug manifests with CLR interpreters: set an attribute value, then dont call ~CMgaAttribute, then AbortTransaction: ObjectInspector calls CMgaAttribute::get_Value, which fails, since cached attribute improperly has ATTR_STATUSHERE
Modified:
trunk/GME/Mga/MgaAttribute.h
trunk/GME/Mga/MgaProject.cpp
Modified: trunk/GME/Mga/MgaAttribute.h
==============================================================================
--- trunk/GME/Mga/MgaAttribute.h Fri Jul 20 14:50:41 2012 (r1973)
+++ trunk/GME/Mga/MgaAttribute.h Mon Jul 23 12:13:58 2012 (r1974)
@@ -128,6 +128,23 @@
CComPtr<IMgaAttribute> retval = s;
return retval;
}
+
+ void clear()
+ {
+ return;
+ size_t mref = 0;
+ for (size_t mref = 0; mref < sizeof(pool) / sizeof(pool[0]); mref++)
+ {
+ CMgaAttribute::hashobp *kk;
+ for (kk = &pool[mref]; *kk != NULL; kk = &(*kk)->next)
+ {
+ if ((*(*kk)->prevptr)->next)
+ (*(*kk)->prevptr)->next = NULL;
+ (*kk)->prevptr = NULL;
+ }
+ pool[mref] = NULL;
+ }
+ }
};
void MergeAttrs(const CoreObj &src, CoreObj &dst);
Modified: trunk/GME/Mga/MgaProject.cpp
==============================================================================
--- trunk/GME/Mga/MgaProject.cpp Fri Jul 20 14:50:41 2012 (r1973)
+++ trunk/GME/Mga/MgaProject.cpp Mon Jul 23 12:13:58 2012 (r1974)
@@ -1401,6 +1401,7 @@
checkoff = false;
while(!changedobjs.empty()) {
changedobjs.front()->objforgetrwnotify();
+ changedobjs.front()->apool.clear();
changedobjs.pop();
}
while(!notifyobjs.empty()) {
More information about the gme-commit
mailing list