Bug 1106464
Summary: | if getReturnValue().setSucceeded(true); is called before exception is thrown command is presented as successful. | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Martin Mucha <mmucha> |
Component: | ovirt-engine | Assignee: | Ravi Nori <rnori> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Mucha <mmucha> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.5.0 | CC: | gklein, iheim, lpeer, michal.skrivanek, oourfali, pstehlik, rbalakri, Rhev-m-bugs, rnori, sherold, yeylon, yzaslavs |
Target Milestone: | --- | Keywords: | CodeChange |
Target Release: | 3.5.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | infra | ||
Fixed In Version: | ovirt-engine-3.5.0_beta | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-02-17 17:07:32 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1142923, 1156165 |
Description
Martin Mucha
2014-06-09 12:15:16 UTC
I think that it should be the responsibility of the command to call setSucceeded(true) only once nothing is left to do... in my opinion, commands that do further logic after that assumes that this logic is insignificant for the successful completion of the command. Yair/Ravi - thoughts? I think, on contrary, that if somewhere there need not to be some convention(setSucceed must be last call of command) or faith in assumptions("insignificant" code will not fail), there should not be such things. Exception can occur unexpectedly, and so does db rollback. Flagging each command from which exception 'leaks' as unsuccessful will spell more robust architecture — user should not get info "OK" if it's not OK, and we should not rely on each command to behave as expected to provide user right response. It's command 'invoker' responsibility. I agree with Martin. Bare in mind that execute is run from within CommandBase, so I think we should handle it in CommandBase. Code change... rhev 3.5.0 was released. closing. |