Andy Kurth created VCL-782:
------------------------------
Summary: utils.pm update_request_state generated unnecessary
critical messages
Key: VCL-782
URL: https://issues.apache.org/jira/browse/VCL-782
Project: VCL
Issue Type: Improvement
Components: vcld (backend)
Affects Versions: 2.3.2
Reporter: Andy Kurth
Assignee: Andy Kurth
Priority: Minor
Fix For: 2.4
utils.pm::update_request_state will not change the state if the current
state/laststate are not what is expected. If this happens, a critical message
is generated.
This will happen if a user deletes a request shortly before the state is to be
changed to reserved/new. update_request_state fails because the current
(expected) state is now pending/new. Example vcld.log output:
{noformat}
|1930|2520582|2619477|new|utils.pm:update_request_state|1323| ---- WARNING ----
|1930|2520582|2619477|new|utils.pm:update_request_state|1323| 2014-09-18
11:47:07|1930|2520582|2619477|new|utils.pm:update_request_state|1323|unable to
update request 2520582 state to: reserved/new, current state: deleted/reserv
ed
|1930|2520582|2619477|new|utils.pm:update_request_state|1323| ( 0) utils.pm,
update_request_state (line: 1323)
|1930|2520582|2619477|new|utils.pm:update_request_state|1323| (-1) new.pm,
process (line: 451)
|1930|2520582|2619477|new|utils.pm:update_request_state|1323| (-2) vcld,
make_new_child (line: 562)
|1930|2520582|2619477|new|utils.pm:update_request_state|1323| (-3) vcld, main
(line: 332)
2014-09-18
|1930|2520582|2619477|new|new.pm:process|455| ---- CRITICAL ----
|1930|2520582|2619477|new|new.pm:process|455| 2014-09-18
11:47:07|1930|2520582|2619477|new|new.pm:process|455|failed to set request
state to 'reserved'/'new'
|1930|2520582|2619477|new|new.pm:process|455| ( 0) new.pm, process (line: 455)
|1930|2520582|2619477|new|new.pm:process|455| (-1) vcld, make_new_child (line:
562)
|1930|2520582|2619477|new|new.pm:process|455| (-2) vcld, main (line: 332)
{noformat}
A check should be added to catch this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)