You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe"#instantiate",:focus=>truedocontext"all links are dead"doit"should remove links that could not be instantiated"do@person.robject.links << @task.to_link("tasks")@person.tasks.inspect# trigger load_object@person.robject.links.shouldbe_emptyendendcontext"only some links are dead"doit"should remove links that could not be instantiated"do@person.robject.links << @task.to_link("tasks")@person.tasks << @other_task@person.tasks.inspect@person.robject.links.shouldhave(1).item@person.robject.links.shouldinclude(@other_task.to_link("tasks"))endendcontext"owner also links to objects of another type"doit"should only remove dead links of the accessed association"do@person.profile=@profile@person.robject.links << @task.to_link("tasks")@person.robject.links.shouldhave(2).item@person.tasks.inspect@person.robject.links.shouldhave(1).itemendendend
The text was updated successfully, but these errors were encountered:
Would be nice to perform read repair and remove dead links from the robject from within Ripple as objects are retrieved from Riak.
Currently operations like #count on a Ripple::Document use keys.count which includes dead links.
https://github.com/basho/ripple/blob/master/lib/ripple/associations/many_linked_proxy.rb#L11-14
Iterating over collections also requires rejecting nil values that result from dead links.
My thought is to perform link cleanup after calls to find_target.
https://github.com/basho/ripple/blob/master/lib/ripple/associations/many_linked_proxy.rb#L48-59
Here are tests to describe the desired behavior that could be added to https://github.com/basho/ripple/blob/master/spec/ripple/associations/many_linked_proxy_spec.rb:
The text was updated successfully, but these errors were encountered: