Make mongo updates more readable and reusable, externalize retry constants for test, raise exception if exceeding the retry limit

Make sure the op is even in a state we recognize before trying to grab it