Re: [classad-users] collections, TruncateLog, and InitializeFromLog


Date: Wed, 10 Apr 2002 14:18:05 -0500 (CDT)
From: Su Zhang <zs@xxxxxxxxxxx>
Subject: Re: [classad-users] collections, TruncateLog, and InitializeFromLog
yes, you are right, but there are no checks when the
initializefromlog() automatically insert the root view everytime it
starts. and the sequence of its works are
  clear all the view,
  insert the root view,
  read all the records from log and insert them into current collection.

what the truncatelog does is to loyally read every record from collection
and write to logfile.

so there really exist the confliction when initializefromlog read the
"root" view record and try to insert it into collecion because it has
already defaultly inserted at the beginning.

as you said, just let truncatelog truncate the root view record. In
this case, root view is only noticable to the system, you will never see
it in the log file(because when it is created by default, there is no log
record for it).

anyway, you are right about it.
thanks,
zs

On Wed, 10 Apr 2002, Rajesh Raman wrote:

> The "root" is created when the collections object is 
> instantiated.  My guess is that its trying to reset
> a view that already exists.  In addition, I remember
> the code having some checks so that the info of the
> root view cannot be changed.  An interaction between
> the two is probably what's causing this bug.  The fix
> might be to not have the "root" view spit out a record
> during truncation.
> 
> ++Rajesh
> 
> --- John Bethencourt <bethenco@xxxxxxxxxxxxxxx> wrote:
> > On Wed, Apr 10, 2002 at 11:07:37AM -0500, Alain
> > Aslag Roy wrote:
> > > John, maybe you could give us a before and after
> > log too: copy the log just 
> > > before you call TruncateLog, and copy it again
> > just after. The smaller the 
> > > log, the easier it will be for us to analyze, but
> > whatever works is okay.
> > 
> > Here are before and after copies of the log. The
> > only method I called on the
> > ClassAdCollection between the two was TruncateLog.
> > 
> > Lest there be any ambiguity about the exact text of
> > the log, note that the
> > first copy of the log has one line and the second
> > has two.
> > 
> > John B
> > 
> > 
> > 
> > <<<log before>>>
> > 
> > [ Ad = [ MyType = "Machine"; Machine =
> > "c01.cs.wisc.edu"; ReservedBy = "nobody" ]; Key =
> > "c01.cs.wisc.edu"; OpType = 10006 ]
> > 
> > <<<log after>>>
> > 
> > [ Requirements = true; SubordinateViews = {  };
> > PartitionExprs = {  }; NumMembers = 1; Rank =
> > undefined; PartitionedViews = {  }; ParentViewName =
> > ""; ViewName = "root"; OpType = 10001 ]
> > [ Ad = [ MyType = "Machine"; Machine =
> > "c01.cs.wisc.edu"; ReservedBy = "nobody" ]; Key =
> > "c01.cs.wisc.edu"; OpType = 10006 ]
> > Condor Classads Info:
> > http://www.cs.wisc.edu/condor/classad/
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> Condor Classads Info:
> http://www.cs.wisc.edu/condor/classad/
> 
> 



Condor Classads Info:
http://www.cs.wisc.edu/condor/classad/




[← Prev in Thread] Current Thread [Next in Thread→]