Kamen,<br><br>what you describes looks to me as if the :transient does not have any effect at all, so the question is what you'd want to use this as a feature for :) - Seriously, what you describe seems to be a bug, as :transient slots should never be logged. In fact, I am depending on this behavior in several places and I wonder how the store serializes the slots that I'm using.
<br><br>I'd recommend to use :transient the way that is described in the documentation, i.e. assume that such slots will not be restored. I will eventually fix this, but it will propably take a few days until I commit.
<br><br>-Hans<br><br><div><span class="gmail_quote">2007/7/6, Kamen TOMOV <<a href="mailto:kamen@cybuild.com">kamen@cybuild.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Hans,<br><br>Lets define a class:<br><br>(define-persistent-class a ()<br> ((s1 :update :transient t)<br> (s2 :update)))<br><br>and make an instance of it:<br><br>(let ((obj (make-object 'a :s1 23 :s2 "ar")))
<br>...<br><br>and then modify its transient slot:<br><br>(setf (a-s1 obj) 3)<br><br>When I stop and start Lisp and do:<br><br>(make-instance 'mp-store....<br><br>I get:<br><br>(slot-value obj 's1)<br>=> 23<br>
(slot-value obj 's2)<br>=> "ar"<br><br>s1 is transient and one might expect it to be unbound, but it is not,<br>so I wondered if it is a bug or a feature, cause I might decide to use<br>it as a feature :-)
<br><br>However, I guess that if I snapshot and then restore the database the<br>transient slot would be unbound (and that would prevent me from using<br>it as a feature, but I probably need a persistent slot anyway). Am I
<br>correct?<br><br><br>Regards,<br><br>--<br>§¬§Ñ§Þ§Ö§ß<br><br><br>----- Original Message -----<br>From: Hans H¨¹bner<br>Sent: 06 §À§Ý§Ú 2007 at 13:47<br>Subject: Re: [bknr-devel] objects with transient slots<br><br>Hi Kamen,<br>
<br>are you saying that your transient slots are written to the transaction log<br>and snapshot? This is not the intended behavior. Can you verify the bug by<br>writing some distinctive string to such a slot, snapshot and then look in
<br>the snapshot file for that string? Do you see the the value retained when<br>restoring or when starting your lisp afresh?<br><br>Thanks,<br>Hans<br><br>2007/7/6, Kamen TOMOV <<a href="mailto:kamen@cybuild.com">kamen@cybuild.com
</a>>:<br>><br>> Hi,<br>><br>> It is said in the datastore-manual:<br>><br>> "... you can specify that a certain slot is transient, which means<br>> that it will not be snapshotted and that its value can be changed
<br>> outside of a transaction."<br>><br>> In my application the value of a transient slot is specified on object<br>> creation. When reloading the transaction log (server restart) the<br>> transient slot is bound and its value is correct. Is this intended
<br>> behaviour or not? How is snapshotting the database different in that<br>> context?<br>><br>> Thanks in advance,<br>><br>> --<br>> Kamen<br>> _______________________________________________<br>
> bknr-devel mailing list<br>> <a href="mailto:bknr-devel@common-lisp.net">bknr-devel@common-lisp.net</a><br>> <a href="http://common-lisp.net/cgi-bin/mailman/listinfo/bknr-devel">http://common-lisp.net/cgi-bin/mailman/listinfo/bknr-devel
</a><br>><br></blockquote></div><br>