Voyage: image freeze/VOMongoError: Lazy reference not found
Hi Esteban, sorry but I need your help again. I succeeded in re-writing all my code to use voyage and can save all my model now. Great! Now I was experimenting with it and I have an Image freeze which should not occur in production;-). Situation: I created one Person with two trips. Trip points back to its person. After writing it into mongo, I delete one trip from mongo manually (I use rockmongo, great tool). So in the database, I have now 1) one Person which points to two trips 2) one trip (the other was deleted) Now, I do: Person selectAll first trips and the image freezes. Sometimes, I find in the DebugLog: VOMongoError: Lazy reference not found RKATrip: OID(103475906) This is correct ;-) I did also try with enableMissingContent but did not work. http://forum.world.st/Voyage-GC-collecting-random-objects-td4668438.html Sure, normally, we do not manipulate the database manually. But I want to be sure that the image does not freeze if this occurs.... How can I solve this? regards Sabine ########################################### with this filein you can reproduce it easily ########################################### Object subclass: #Person instanceVariableNames: 'trips lastName' classVariableNames: '' poolDictionaries: '' category: 'RKA24-Demo'! !Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'! lastName ^ lastName! ! !Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'! lastName: anObject lastName := anObject! ! !Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'! trips ^ trips! ! !Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'! trips: anObject trips := anObject! ! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! Person class instanceVariableNames: ''! !Person class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 10:06'! isVoyageRoot ^true! ! !Person class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 11:48'! mongoContainer <mongoContainer> ^VOMongoContainer new collectionName: 'testPersons'; enableMissingContent; kind: Person; yourself! ! !Person class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 10:13'! mongoTrips <mongoDescription> ^ VOMongoToManyDescription new attributeName: 'trips'; kind: Trip; yourself! ! Object subclass: #Trip instanceVariableNames: 'description person' classVariableNames: '' poolDictionaries: '' category: 'RKA24-Demo'! !Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:04'! description ^ description! ! !Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/12/2013 10:12'! description: anObject description := anObject! ! !Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:04'! person ^ person! ! !Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:04'! person: anObject person := anObject! ! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! Trip class instanceVariableNames: ''! !Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/12/2013 09:47'! isVoyageRoot ^true! ! !Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 11:48'! mongoContainer <mongoContainer> ^VOMongoContainer new collectionName: 'testTrips'; enableMissingContent; kind: Trip; yourself! ! !Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 10:12'! mongoPerson "VOMongoRepository allInstancesDo: #reset. " <mongoDescription> ^ VOMongoToOneDescription new attributeName: 'person'; kind: Person; yourself ! ! !Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 11:50'! testOnePersonTwoTrips | theTrip the2ndTrip thePerson | thePerson := Person new lastName: 'Knoefel'. theTrip := Trip new description: 'Trip to Munic'. the2ndTrip := Trip new description: 'Trip to Essen'. theTrip person: thePerson. the2ndTrip person: thePerson. thePerson trips: (OrderedCollection with: theTrip with: the2ndTrip ). theTrip save. VOMongoRepository allInstancesDo: #reset. "now I delete one trip from mongo" Person selectAll first trips! ! -- View this message in context: http://forum.world.st/Voyage-image-freeze-VOMongoError-Lazy-reference-not-fo... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Hi Sabine, yes... I have found that problem time to time too. The way to solve it in mongo is to allow the collection to take dead references as "valid missing content". Of course, this is a dangerous feature, and that's why is not enabled by default. To enable it, you need to add a property to the trip container: Trip class>>mongoContainer <mongoContainer> ^ VOMongoContainer new enableMissingContent; yourself that should solve your problem. I could this "eventual integrity" and is very suspicious... but the only way I found to treat in image what could happen outside it... :) cheers, Esteban On Aug 15, 2013, at 12:04 PM, Sabine Knöfel <sabine.knoefel@gmail.com> wrote:
Hi Esteban,
sorry but I need your help again.
I succeeded in re-writing all my code to use voyage and can save all my model now. Great!
Now I was experimenting with it and I have an Image freeze which should not occur in production;-).
Situation:
I created one Person with two trips. Trip points back to its person. After writing it into mongo, I delete one trip from mongo manually (I use rockmongo, great tool).
So in the database, I have now 1) one Person which points to two trips 2) one trip (the other was deleted)
Now, I do: Person selectAll first trips
and the image freezes.
Sometimes, I find in the DebugLog: VOMongoError: Lazy reference not found RKATrip: OID(103475906)
This is correct ;-)
I did also try with enableMissingContent but did not work. http://forum.world.st/Voyage-GC-collecting-random-objects-td4668438.html
Sure, normally, we do not manipulate the database manually. But I want to be sure that the image does not freeze if this occurs....
How can I solve this?
regards Sabine
########################################### with this filein you can reproduce it easily ########################################### Object subclass: #Person instanceVariableNames: 'trips lastName' classVariableNames: '' poolDictionaries: '' category: 'RKA24-Demo'!
!Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'! lastName
^ lastName! !
!Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'! lastName: anObject
lastName := anObject! !
!Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'! trips
^ trips! !
!Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'! trips: anObject
trips := anObject! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
Person class instanceVariableNames: ''!
!Person class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 10:06'! isVoyageRoot ^true! !
!Person class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 11:48'! mongoContainer <mongoContainer>
^VOMongoContainer new collectionName: 'testPersons'; enableMissingContent; kind: Person; yourself! !
!Person class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 10:13'! mongoTrips <mongoDescription>
^ VOMongoToManyDescription new attributeName: 'trips'; kind: Trip; yourself! !
Object subclass: #Trip instanceVariableNames: 'description person' classVariableNames: '' poolDictionaries: '' category: 'RKA24-Demo'!
!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:04'! description
^ description! !
!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/12/2013 10:12'! description: anObject
description := anObject! !
!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:04'! person
^ person! !
!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:04'! person: anObject
person := anObject! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
Trip class instanceVariableNames: ''!
!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/12/2013 09:47'! isVoyageRoot ^true! !
!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 11:48'! mongoContainer <mongoContainer>
^VOMongoContainer new collectionName: 'testTrips'; enableMissingContent; kind: Trip; yourself! !
!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 10:12'! mongoPerson "VOMongoRepository allInstancesDo: #reset. "
<mongoDescription>
^ VOMongoToOneDescription new attributeName: 'person'; kind: Person; yourself ! !
!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 11:50'! testOnePersonTwoTrips | theTrip the2ndTrip thePerson | thePerson := Person new lastName: 'Knoefel'. theTrip := Trip new description: 'Trip to Munic'. the2ndTrip := Trip new description: 'Trip to Essen'. theTrip person: thePerson. the2ndTrip person: thePerson. thePerson trips: (OrderedCollection with: theTrip with: the2ndTrip ). theTrip save.
VOMongoRepository allInstancesDo: #reset.
"now I delete one trip from mongo"
Person selectAll first trips! !
-- View this message in context: http://forum.world.st/Voyage-image-freeze-VOMongoError-Lazy-reference-not-fo... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Hi Esteban, thank you for your quick response. I already had the >>enableMissingContent method in the mongoContainer (see fileout). I was trying with a new Image and it worked! In the old image, I debugged into and the Image froze in >>basicNew in VOLazyProxy>>repository: aRepository objectClass: aClass id: idObject ^self basicNew initializeRepository: aRepository class: aClass id: idObject For now, I take the new image and proceed. But I dont know the reason for freezing and hope it will not come again :-) Thanks again Sabine On Thu, Aug 15, 2013 at 1:34 PM, EstebanLM [via Smalltalk] < ml-node+s1294792n4703743h28@n4.nabble.com> wrote:
Hi Sabine,
yes... I have found that problem time to time too. The way to solve it in mongo is to allow the collection to take dead references as "valid missing content". Of course, this is a dangerous feature, and that's why is not enabled by default. To enable it, you need to add a property to the trip container:
Trip class>>mongoContainer <mongoContainer>
^ VOMongoContainer new enableMissingContent; yourself
that should solve your problem.
I could this "eventual integrity" and is very suspicious... but the only way I found to treat in image what could happen outside it... :)
cheers, Esteban
On Aug 15, 2013, at 12:04 PM, Sabine Knöfel <[hidden email]<http://user/SendEmail.jtp?type=node&node=4703743&i=0>> wrote:
Hi Esteban,
sorry but I need your help again.
I succeeded in re-writing all my code to use voyage and can save all my model now. Great!
Now I was experimenting with it and I have an Image freeze which should not occur in production;-).
Situation:
I created one Person with two trips. Trip points back to its person. After writing it into mongo, I delete one trip from mongo manually (I use rockmongo, great tool).
So in the database, I have now 1) one Person which points to two trips 2) one trip (the other was deleted)
Now, I do: Person selectAll first trips
and the image freezes.
Sometimes, I find in the DebugLog: VOMongoError: Lazy reference not found RKATrip: OID(103475906)
This is correct ;-)
I did also try with enableMissingContent but did not work. http://forum.world.st/Voyage-GC-collecting-random-objects-td4668438.html
Sure, normally, we do not manipulate the database manually. But I want to be sure that the image does not freeze if this occurs....
How can I solve this?
regards Sabine
########################################### with this filein you can reproduce it easily ########################################### Object subclass: #Person instanceVariableNames: 'trips lastName' classVariableNames: '' poolDictionaries: '' category: 'RKA24-Demo'!
!Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'! lastName
^ lastName! !
!Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'! lastName: anObject
lastName := anObject! !
!Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'! trips
^ trips! !
!Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'! trips: anObject
trips := anObject! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
Person class instanceVariableNames: ''!
!Person class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 10:06'! isVoyageRoot ^true! !
!Person class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 11:48'! mongoContainer <mongoContainer>
^VOMongoContainer new collectionName: 'testPersons'; enableMissingContent; kind: Person; yourself! !
!Person class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 10:13'! mongoTrips <mongoDescription>
^ VOMongoToManyDescription new attributeName: 'trips'; kind: Trip; yourself! !
Object subclass: #Trip instanceVariableNames: 'description person' classVariableNames: '' poolDictionaries: '' category: 'RKA24-Demo'!
!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:04'! description
^ description! !
!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/12/2013 10:12'! description: anObject
description := anObject! !
!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:04'! person
^ person! !
!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:04'! person: anObject
person := anObject! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
Trip class instanceVariableNames: ''!
!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/12/2013 09:47'! isVoyageRoot ^true! !
!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 11:48'! mongoContainer <mongoContainer>
^VOMongoContainer new collectionName: 'testTrips'; enableMissingContent; kind: Trip; yourself! !
!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 10:12'! mongoPerson "VOMongoRepository allInstancesDo: #reset. "
<mongoDescription>
^ VOMongoToOneDescription new attributeName: 'person'; kind: Person; yourself ! !
!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel 8/15/2013 11:50'! testOnePersonTwoTrips | theTrip the2ndTrip thePerson | thePerson := Person new lastName: 'Knoefel'. theTrip := Trip new description: 'Trip to Munic'. the2ndTrip := Trip new description: 'Trip to Essen'. theTrip person: thePerson. the2ndTrip person: thePerson. thePerson trips: (OrderedCollection with: theTrip with: the2ndTrip ). theTrip save.
VOMongoRepository allInstancesDo: #reset.
"now I delete one trip from mongo"
Person selectAll first trips! !
-- View this message in context: http://forum.world.st/Voyage-image-freeze-VOMongoError-Lazy-reference-not-fo... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
------------------------------ If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Voyage-image-freeze-VOMongoError-Lazy-reference-not-fo... To unsubscribe from Voyage: image freeze/VOMongoError: Lazy reference not found, click here<http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&nod...> . NAML<http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant...>
-- View this message in context: http://forum.world.st/Voyage-image-freeze-VOMongoError-Lazy-reference-not-fo... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I've been bitten by this too. This is when the "image" concept get counterproductive if you didn't commit all your code changes. :-/ Esteban A. Maringolo
Hi Esteban, til now, it did not come back to me. Can you reproduce it with a fresh image? Btw I am saving my image now each hour or so... Sabine On Sat, Aug 31, 2013 at 5:46 PM, Esteban A. Maringolo [via Smalltalk] < ml-node+s1294792n4705953h38@n4.nabble.com> wrote:
I've been bitten by this too. This is when the "image" concept get counterproductive if you didn't commit all your code changes. :-/
Esteban A. Maringolo
------------------------------ If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Voyage-image-freeze-VOMongoError-Lazy-reference-not-fo... To unsubscribe from Voyage: image freeze/VOMongoError: Lazy reference not found, click here<http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&nod...> . NAML<http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant...>
-- View this message in context: http://forum.world.st/Voyage-image-freeze-VOMongoError-Lazy-reference-not-fo... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
2013/8/31 Sabine Knöfel <sabine.knoefel@gmail.com>:
Hi Esteban,
til now, it did not come back to me. Can you reproduce it with a fresh image?
The image freezed, but fortunately with a LOT of patience I was able to type a character every once in a while. So I could write an smalltalk expression that after being evaluated opened a debugger and caused the image to get responsive again. The expression was a last resort in order to "cause" another error that could give me the control back. VOLazyProxy allInstances do: [:each | each become: String new ] It worked.
Btw I am saving my image now each hour or so...
I'm not used to do it, I trust in the changes file, the problem is that I saved the image with the offending proxy. The problem was a modification of a document in a collection. I did a mongo upsert that changed it, and apparently Voyage didn't know how to handle it. Regards!
participants (3)
-
Esteban A. Maringolo -
Esteban Lorenzano -
Sabine Knöfel