[Nitro] OG [PATCH RFC]: Separate Og.start options hash from Og.manager_options

George Moschovitis george.moschovitis at gmail.com
Thu Sep 13 03:37:23 EDT 2007


Seems logical. I am applying the patch. However a better solution is needed
(that will properly handle multiple Og stores at the same time, for db
partitioning/sharding, etc)
We will get back to this at a later time.

thank you,
George.

On 9/13/07, Mark Van De Vyver <mvyver at gmail.com> wrote:
>
> Hi Devs,
>
> Spec's helped indicate something was wrong but it still took much time
> to work out what - esp given I was working on an adapter spec and this
> is in the og.rb file.... :)
>
> Separate Og start options hash from Og.manager_options - consecutive
> starts no longer pollute Og.manager_options
>
> The attached patch attempts to isolate the options hash that og
> receives on start, and any changes made to it, from the defaults
> stored in Og.manager_options.
>
> Reason, consider the following sequence (pre-patch):
>
> Og.start # Starts with Og default options - EXPECTED
> Og.manager.close_store
> Og.manager.unmanage_classes
>
> Og.start({<custom_hash>}) # Starts with custom options - EXPECTED
> Og.manager.close_store
> Og.manager.unmanage_classes
>
> Og.start # Starts with custom options - UNEXPECTED
> Og.manager.close_store
> Og.manager.unmanage_classes
>
> Instead I believe the startup behavior should be (post-patch):
>
> Og.start # Starts with Og default options - EXPECTED
> Og.manager.close_store
> Og.manager.unmanage_classes
>
> Og.start({<custom_hash>}) # Starts with custom options - EXPECTED
> Og.manager.close_store
> Og.manager.unmanage_classes
>
> Og.start # Starts with Og default options - EXPECTED
> Og.manager.close_store
> Og.manager.unmanage_classes
>
> The way to change default startup behavior would be (post-patch):
>
> Og.manger_options={}.update({<custom_hash>})
> Og.start #starts with custom options - EXPECTED
> Og.manager.close_store
> Og.manager.unmanage_classes
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>


-- 
http://www.me.gr
http://phidz.com
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070913/00c10a61/attachment.html 


More information about the Nitro-general mailing list