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

Pending tickets #79

Closed
jmgasper opened this issue Sep 11, 2018 · 0 comments
Closed

Pending tickets #79

jmgasper opened this issue Sep 11, 2018 · 0 comments

Comments

@jmgasper
Copy link
Collaborator

If there are multiple pending tickets at the same time, while we wait for them to have challenges created, they go into the mongoDB with a null challengeID. The problem is that the challengeID is an index, so that causes a collision / duplicate key error:

2018-09-11T02:34:20.619428+00:00 app[worker.1]: error: Error happened in process
2018-09-11T02:34:20.619432+00:00 app[worker.1]: MongoError: E11000 duplicate key error index: heroku_k366sw2n.issues.$challengeId_1 dup key: { : null }
2018-09-11T02:34:20.619437+00:00 app[worker.1]: at Function.MongoError.create (/app/node_modules/mongodb-core/lib/error.js:31:11)
2018-09-11T02:34:20.619439+00:00 app[worker.1]: at toError (/app/node_modules/mongodb/lib/utils.js:139:22)
2018-09-11T02:34:20.619441+00:00 app[worker.1]: at /app/node_modules/mongodb/lib/collection.js:668:23
2018-09-11T02:34:20.619443+00:00 app[worker.1]: at handleCallback (/app/node_modules/mongodb/lib/utils.js:120:56)
2018-09-11T02:34:20.619445+00:00 app[worker.1]: at /app/node_modules/mongodb/lib/bulk/unordered.js:465:9
2018-09-11T02:34:20.619446+00:00 app[worker.1]: at handleCallback (/app/node_modules/mongodb/lib/utils.js:120:56)
2018-09-11T02:34:20.619448+00:00 app[worker.1]: at resultHandler (/app/node_modules/mongodb/lib/bulk/unordered.js:413:5)
2018-09-11T02:34:20.619450+00:00 app[worker.1]: at /app/node_modules/mongodb-core/lib/connection/pool.js:469:18
2018-09-11T02:34:20.619452+00:00 app[worker.1]: at _combinedTickCallback (internal/process/next_tick.js:131:7)
2018-09-11T02:34:20.619453+00:00 app[worker.1]: at process._tickCallback (internal/process/next_tick.js:180:9)
2018-09-11T02:34:20.620372+00:00 app[worker.1]: error:  message=E11000 duplicate key error index: heroku_k366sw2n.issues.$challengeId_1 dup key: { : null }, name=MongoError, stack=MongoError: E11000 duplicate key error index: heroku_k366sw2n.issues.$challengeId_1 dup key: { : null }
2018-09-11T02:34:20.620375+00:00 app[worker.1]: at Function.MongoError.create (/app/node_modules/mongodb-core/lib/error.js:31:11)

We should fix the index so that the challengeID isn't required.

jmgasper added a commit to topcoder-archive/topcoder-platform-topcoder-x-processor that referenced this issue Sep 25, 2018
jmgasper added a commit that referenced this issue Sep 25, 2018
jmgasper added a commit that referenced this issue Oct 2, 2018
#89 (major requirement)
#88 (major requirement)
#87 (major requirement)
#86 (major requirement)
#83
#82
#74
#71
#35 (major requirement)
#79 (major requirement)
#76
@jmgasper jmgasper closed this as completed Oct 2, 2018
jmgasper added a commit that referenced this issue Oct 9, 2019
jmgasper added a commit that referenced this issue Oct 9, 2019
#89 (major requirement)
#88 (major requirement)
#87 (major requirement)
#86 (major requirement)
#83
#82
#74
#71
#35 (major requirement)
#79 (major requirement)
#76
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