Uploaded image for project: 'VCL'
  1. VCL
  2. VCL-782

utils.pm update_request_state generated unnecessary critical messages

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.2
    • 2.4
    • vcld (backend)
    • None

    Description

      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:

      |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)
      

      A check should be added to catch this.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            arkurth Andrew Kurth
            arkurth Andrew Kurth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment