r-universe-org / help

Support and bug tracker for R-universe
https://docs.r-universe.dev/
9 stars 2 forks source link

duplicate key error after new patch release of mongodb #142

Open jeroen opened 2 years ago

jeroen commented 2 years ago

See https://github.com/r-universe/ropensci/runs/5862942613?check_suite_focus=true

Deploy failure says:

  { [750 bytes data]

  100 1602k  100   750  100 1601k   4028  8601k --:--:-- --:--:-- --:--:-- 8567k
  * Connection #0 to host ropensci.r-universe.dev left intact
  curl: (22) The requested URL returned error: 400
  <!DOCTYPE html><html><head><title></title><link rel="stylesheet" href="/assets/css/style.css"></head><body><h1>Error in openUploadStreamWithId(): MongoError: E11000 duplicate key error collection: cranlike.files.chunks index: files_id_1_n_1 dup key: { files_id: &quot;34274b4ff2a5a6a0b2fd1089df82ded1&quot;, n: 0 }</h1><h2>400</h2><pre>BadRequestError: Error in openUploadStreamWithId(): MongoError: E11000 duplicate key error collection: cranlike.files.chunks index: files_id_1_n_1 dup key: { files_id: &quot;34274b4ff2a5a6a0b2fd1089df82ded1&quot;, n: 0 }
      at /app/node_modules/cranlike/routes/packages.js:23:10
      at runMicrotasks (&lt;anonymous&gt;)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)</pre></body></html>Something went wrong. Waiting 10 seconds to retry...
  Package deploy failed
jeroen commented 2 years ago

The error is caused by "orphaned chunks" in gridfs: https://www.mongodb.com/docs/drivers/java/sync/current/fundamentals/gridfs

jeroen commented 2 years ago

I think the error is gone after running removing orphaned chunks (by running cleanorphans.js)