problem handling invalid multi op in processTxn
-----------------------------------------------
Key: ZOOKEEPER-1341
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1341
Project: ZooKeeper
Issue Type: Bug
Components: server
Affects Versions: 3.4.0
Reporter: Patrick Hunt
The handling of an invalid multi op in
org.apache.zookeeper.server.DataTree.processTxn(TxnHeader, Record) is unusual,
looks wrong to me.
In particular an IOException is thrown and then essentially ignored, it seems
to me we should fail the operation properly instead. This will be more
important if we add new op types going fwd.
Use of assert is a bit suspect as well, however perhaps it's fine... not sure.
(we don't explicitly turn on assertions in our tests so not sure how useful it
is regardless)
Also notice that the catch of IOException is ignoring the result. It seems to
me that handling this exception should be localized to the multi block
(separate it out to it's own method seems like a good idea).
We should add a test for this case.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira