Rick Cobb
2015-04-10 02:09:07 UTC
We've been using ruote for a few years here, but have recently begun seeing
a fairly nasty way to get stuck.
Simplifying, we use a concurrent iterator roughly like:
citerator :tag => 'main', :on_field => 'fu', :to_f => 'bar', :merge_type
=> 'stack' do
cursor :tag => 'collect-${v:ii}', :unless => '${f:bar.keep}' do
unset 'f:rewind_to', :tag => 'c14n'
...
end
end
Enter code here...
What we're seeing (with multiple workers running) is that if we have a
bunch of our entries marked with ${f:bar:keep} true, then we end up with
the citerator having an "orphaned branch". The branch expression is gone
(not in the database anymore), but in the debugger, we see that the
citerator still has a child for it.
I think this is caused by the ``concurrence`` (and ``citerator`` code)
ignoring the return value of ``do_persist``. That is, if two branches are
"over" at the same time (i.e., replying into two different workers
simultaneously), one will be able to persist the new version of the
citerator exception -- and the other will fail silently.
Does this sound plausible? Or is there some exception handling I'm not
seeing?
--
a fairly nasty way to get stuck.
Simplifying, we use a concurrent iterator roughly like:
citerator :tag => 'main', :on_field => 'fu', :to_f => 'bar', :merge_type
=> 'stack' do
cursor :tag => 'collect-${v:ii}', :unless => '${f:bar.keep}' do
unset 'f:rewind_to', :tag => 'c14n'
...
end
end
Enter code here...
What we're seeing (with multiple workers running) is that if we have a
bunch of our entries marked with ${f:bar:keep} true, then we end up with
the citerator having an "orphaned branch". The branch expression is gone
(not in the database anymore), but in the debugger, we see that the
citerator still has a child for it.
I think this is caused by the ``concurrence`` (and ``citerator`` code)
ignoring the return value of ``do_persist``. That is, if two branches are
"over" at the same time (i.e., replying into two different workers
simultaneously), one will be able to persist the new version of the
citerator exception -- and the other will fail silently.
Does this sound plausible? Or is there some exception handling I'm not
seeing?
--
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to openwferu-***@googlegroups.com
to unsubscribe : send email to openwferu-users+***@googlegroups.com
more options : http://groups.google.com/group/openwferu-users?hl=en
---
You received this message because you are subscribed to the Google Groups "ruote" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwferu-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
you received this message because you are subscribed to the "ruote users" group.
to post : send email to openwferu-***@googlegroups.com
to unsubscribe : send email to openwferu-users+***@googlegroups.com
more options : http://groups.google.com/group/openwferu-users?hl=en
---
You received this message because you are subscribed to the Google Groups "ruote" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwferu-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.