Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Timing of events #61

Closed
jmgasper opened this issue Aug 21, 2018 · 0 comments
Closed

Timing of events #61

jmgasper opened this issue Aug 21, 2018 · 0 comments

Comments

@jmgasper
Copy link
Collaborator

Current problem

We have a few cases in the topcoder-x-processor where multiple events can come in quickly, before the initial challenge has been created. Challenge creation through the TC Challenge API can take awhile, so if the processor tries to process an assignment event before the challenge has been created, it will attempt to create another challenge in the mean time.

What happens is that we end up with a bunch of duplicate challenges in TC Direct:

screen shot 2018-08-21 at 1 49 36 pm

Suggested fix

What we suggest doing is this:

  1. When a challenge API creation call is made, already have the mapping created in the issues table in the DB. We can add a new status field and fill it with appropriate states, like:
  • challenge_creation_pending
  • challenge_creation_failed
  • challenge_creation_successful
  1. When we get assignment or other update events, they can first check the status of the associated issue mapping. If the status is not challenge_creation_successful, they can retry after a set amount of time, which we already have the capability of doing

  2. If challenge creation fails, we can retry again

Validate fix

After the fix has been applied, no duplicate tickets should be created under any normal circumstances.

jmgasper added a commit that referenced this issue Sep 21, 2018
#44
#61 (Major requirement)
#42 (Major requirement)
#43
#77 (Major requirement)
#66
jmgasper added a commit that referenced this issue Sep 25, 2018
#44
#61 (Major requirement)
#42 (Major requirement)
#43
#77 (Major requirement)
#66
jmgasper added a commit that referenced this issue Oct 9, 2019
#44
#61 (Major requirement)
#42 (Major requirement)
#43
#77 (Major requirement)
#66
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant