Page MenuHomePhabricator

Test SecurePoll during concurrent voting
Closed, ResolvedPublic

Description

Motivation

To prepare for the large amount of voting we could see during the Board elections we should test how SecurePoll would handle concurrent voting. Here's what @tstarling wrote:

My main concern would be lock times in Auth::getVoter(). It originally had a real transaction wrapping > it but was converted to fake transactions (startAtomic/endAtomic) in 2016. It has a locking select which might lock the gap and prevent other users from authenticating. You could test it by setting up two browser windows logged in as different users, put a sleep(20) after the selectRow() in Auth::getVoter() to exaggerate the lock time, and then try to load the voting form in both browser windows. My guess is that you’ll see a 40s wait in one of the windows as one user waits for the other.
Or maybe there will be a deadlock error.

In an ideal scenario, no voter would see an error. We need to determine if this happens and if so we want to find possible mitigations.

Event Timeline

Niharika triaged this task as Medium priority.Aug 9 2021, 5:31 PM
Niharika created this task.

Per testing, there is a delay of 40 seconds testing with @tstarling 's method.

To paraphrase what I said during yesterday's AHT RTL Stand-up & Check-in meeting:

It's hard to tell what the relative priority of this task is vs everything else that we're working on in the run up to the board election. I asked how many polls had been run since 2016 and whether anyone knew if this had been reported by a user voting in one of those polls. I think @drochford said that he wasn't aware of any such reports.

I don't think that this task should necessarily be closed but noted as a possibility and moved out of Anti-Harassment (The Letter Song).