Uploaded image for project: 'Infrastructure'
  1. Infrastructure
  2. INFRA-1323

Make board election code concurrency safe

    Details

    • Type: Task
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: etc
    • Labels:
      None
    • Similar Issues:

      Description

      Currently we read in a single results file, modify it, then write it out again:

      https://github.com/jenkins-infra/account-app/blob/803587a/src/main/java/org/jenkinsci/account/BoardElection.java#L64-L78

      Simultaneous HTTP requests to the voting endpoint could end up in data loss.

      We should do something like write out one file per user (named with something rather opaque, like some LDAP user ID), containing only their comma-separated list of votes.  This also means users can easily update their vote as often as they like.

        Attachments

          Activity

          Show
          olblak Olivier Vernin added a comment - https://github.com/jenkins-infra/account-app/pull/108

            People

            • Assignee:
              olblak Olivier Vernin
              Reporter:
              orrc Christopher Orr
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: