Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low Priority - Issue creating accounts simultaneously on different devices #21

Open
hdsbbrooks opened this issue Jan 7, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@hdsbbrooks
Copy link
Contributor

Low Priority - Issue creating accounts simultaneously on different devices
This year we started using multiple computers in different rooms to speed up the login process. We ran into an issue during the account creations process wherein new accounts over-write each other.

I meant to get around to writing, testing and contributing a fix to this before build season but I didn't manage to get around to it. I'm posting this here just in case anyone else plans to run multiple kiosks. I plan to add some validation to fix this issue, but won't be able to write and contribute it back until after the 2022 build season.

To Reproduce
Steps to reproduce the behavior:

  1. Have grizzly time running on two separate machines.
  2. Create two accounts at the same time on each machine.
  3. If you watch the spreadsheet during this processing you can see one account being overwritten by the other on the main profile page.

Workaround
Only allow students to create accounts on a single machine. Once accounts are created having students log-in across different machines works fine.

Cause
I suspect the issue is a race condition caused by grizzly time grabbing a duplicate "blank" row number in the createNewUser method before a previous write has finished. I have not tested this supposition.

@hdsbbrooks hdsbbrooks added the bug Something isn't working label Jan 7, 2022
@Daltz333
Copy link
Member

Daltz333 commented Jan 7, 2022

Hm, I'm not sure how to precisely "know" when another use is writing to the spreadsheet.

@hdsbbrooks
Copy link
Contributor Author

Yea, my first few idea ideas at "easy" solutions I ruled out after further thought. Currently I am thinking that adding another call to dbUtils.getUpdatedData(); right before pulling the empty row might resolve the issue...but I would need to do some testing to verify. If that didn't do the trick I was going to see if making the database utils do an append to the end instead of an update to a predetermined "last row" when adding the new record would take care of it.

I have not done much with the sheets api for years and I have not yet had time to dig a bit deeper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants