Project: datamanagement
Issue DM-2681: Fix race condition in userQueryProxy
In UserQuery_kill, depending on timing, the call "uqManager.get(session)->kill()" can fail if kill is called more than once by user, because the session might get deleted by the earlier kill. To simulate this, I modified the code to delay the second kill as follows: {code} void UserQuery_kill(int session) { static int killNo = 0; killNo ++; LOGF_INFO("EXECUTING UserQuery_kill(%1%), %2%" % session % killNo); if (killNo > 1) { sleep(10); } uqManager.get(session)->kill(); } {code} We need to revisit if other functions in this class might suffer in similar way.
Story points: 4