Actually, I looked into this further, and ["error","unknown_command"]
is always a fatal.
It's just the only "error" that happens also to be a fatal, as far as
I can tell.
stephen
On Jun 17, 2010, at 12:00 PM, J Chris Anderson wrote:
On Jun 17, 2010, at 8:48 AM, Stephen Prater wrote:
Okay, that raises a few more questions for me.
The test calls for issuing "['error','unknown_command']" in this
situation.
Is this the only situation where "Known but inappropriate" command
should be a fatal? Are there other situations where you could GET
a "known but inappropriate" command?
"unknown_command" is not nominally a fatal right? If I issue
"['foo']" to a view server, it just responds with an error and
continues.
If so, and "unknown_command" is fatal only in this one case, is it
the correct error to be issuing?
I'm not 100% sure of all the names. The reason for this particular
condition being fatal, is that it indicates that the Erlang side and
the Query Server side have gotten out of sync, and the best thing to
do in that case is to kill the query server completely and start a
new one.
It used to be that that was how we handled any error, but now that
the query server has some relatively expensive state (design
documents) it made sense to avoid fully killing it in places where
the Erlang and the Query Server both agree about where they are in
the protocol (even if something goes wrong executing a command).
Does that make sense?
Also, is there any situation where you could get a "list_row"
command OUTSIDE of a list function and it wouldn't be fatal?
No, I think not.
There is some talk of redoing this part of the protocol because
currently there is no support for setting headers based on the rows
(eg you have to set headers before the first getRow() call). But
fixing this will require some thinking...
Chris
On Jun 17, 2010, at 10:02 AM, J Chris Anderson wrote:
On Jun 17, 2010, at 7:37 AM, Stephen Prater wrote:
Actually, just a particular view server test.
The one that's rpsec definition is "query server that exits only
goes to 2 list should exit if erlang sends too many rows."
I'm not a 100% sure exactly what this test is ... testing -
perhaps because the rspec "english" isn't really clear.
I'm guessing that it's testing that that the view server bails if
it get's a "list_row" command that it isn't expecting?
Yes. The idea is that if the view server thinks it's done with a
particular _list, but Erlang disagrees, the view server should
exit immediately.
Can someone clarify the expected behavior here?
Thanks,
--
Stephen Prater