Esteban's ChangeLog week of 27 March 2017

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Esteban's ChangeLog week of 27 March 2017

EstebanLM
Hello!

This is my weekly ChangeLog, from 27 March 2017 to 2 April 2017.
You can see it in a better format by going here: http://log.smallworks.eu/web/search?from=27/3/2017&to=2/4/2017

ChangeLog
=========

31 March 2017:
--------------

*    Yesterday I spent most of the day verifying why the pharo site was going down time to time... as a result, we found
    a problem in Voyage that may cause a deadlock under heavy load.
   
    Finally, with the help of Guille we help a possible cause in the way the +VOLazyProxy+ is implemented.
   
    This is +#doesNotUnderstand:+ current implementation:
   
    ----
    VOLazyProxy>>doesNotUnderstand: aMessage
    | realObject |
   
    realObject := self obtainRealObject.
    realObject ifNil: [
    (repository descriptionBuilder for: objectClass) isAllowMissingContent
    ifTrue: [
    realObject := VOMissingObject class: objectClass id: objectId ]
    ifFalse: [
    VOError signal: ('Lazy reference not found {1}: {2}' format: {objectClass name. objectId}) ] ].
   
    VOLazyProxy mutex critical: [
    self == realObject
    ifFalse: [ self becomeForwardKeepingHash: realObject ] ].
    ^realObject
    perform: aMessage selector
    withArguments: aMessage arguments.
    ----
   
    It is designed to prevent double attempt to become when trying to access same proxy at concurrent moments (in webapps is
    very frequent).
   
    We discovered this implementation has some problems:
   
    * When doing the comparisson of of +self+ with +realObject+ self can already be in the stack, and then it can fail.
    * apparently the error handler handles the occurrence of +Semaphore+ in a stack in weird ways (to ensure is debuggable) :)
   
    So, now I'm testing (and proposing to Voyage) this implementation:
   
    ----
    VOLazyProxy>>#doesNotUnderstand: aMessage
    | realObject thisObject error |
   
    realObject := self obtainRealObject.
    realObject ifNil: [
    (repository descriptionBuilder for: objectClass) isAllowMissingContent
    ifTrue: [
    realObject := VOMissingObject class: objectClass id: objectId ]
    ifFalse: [
    VOError signal: ('Lazy reference not found {1}: {2}' format: {objectClass name. objectId}) ] ].
   
    error := nil.
    thisObject := self.
    VOLazyProxy mutex critical: [
    thisObject == realObject ifFalse: [
    [ self becomeForwardKeepingHash: realObject ]
    on: Error do: [ :e | error := e ] ] ].
    error ifNotNil: [
    VOLazyProxyBecomeError new
    error: error;
    signal ].
   
    ^realObject
    perform: aMessage selector
    withArguments: aMessage arguments.
    ----
   
    If this works, I will submit an update to [Voyage](http://github.com/pharo-nosql/voyage) immediately :)
   

29 March 2017:
--------------

*    I validated some changes to Athens and copyBits primitive to fix the crashing problem.
   
    Seems to be working so I will integrate it... thanks Eliot!
   
*    Still with [Iceberg](https://github.com/npasserini/iceberg), I took care of some bug... but most important than that,
    I added an option to create repositories from Iceberg.
   
    This is very simple: you click in the "New repository" button :)
   
    This way you do not need a remote repository to start working, and you can keep your versions in your local environent
    if you want.
   
    *WARNNING*: When doing your first push, it has to be a clean push (fast-forward), I have had problems trying the
    otherwise (which triggered a merge that Iceberg still does not knows how to handle).
   

27 March 2017:
--------------

*    I just spent sometime fixing stuff on [Iceberg](https://github.com/npasserini/iceberg).
   
    * I fixed [issue 313](https://github.com/npasserini/iceberg/issues/313) (now user gets a dialog to set user properties when needed).
    * Now commit dialog remembers last choice of "push" automatically while commiting.
   

cheers!
Esteban