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

Cannot upload more files at once #938

Closed
eikek opened this issue Jul 16, 2021 · 1 comment · Fixed by #939
Closed

Cannot upload more files at once #938

eikek opened this issue Jul 16, 2021 · 1 comment · Fixed by #939
Labels
bug Something isn't working or in unexpected ways restserver Affects the rest server.

Comments

@eikek
Copy link
Owner

eikek commented Jul 16, 2021

When uploading multiple files at once (with multiple: false), the jobs cannot be added due to key errors.

curl -F file=@README.md -F file=@LICENSE.txt http://localhost:7880/api/v1/open/upload/item/BDw5yfNzpcq-XqnXhH12bCA-7PX55K5oRHL-EGPe2S69uCf

Log output:

restserver [io-compute-2] INFO  d.b.ops.OUpload - Receiving file File(Some(README.md),Some(MimeType(application,octet-stream,Map())),Stream(..))
restserver [io-compute-6] INFO  d.b.ops.OUpload - Receiving file File(Some(LICENSE.txt),Some(MimeType(text,plain,Map())),Stream(..))
restserver [io-compute-4] DEBUG d.b.ops.OUpload - Storing jobs: Vector(RJob(Ident(GtWUbE8VSW1-3saEsDMfok1-M4FNZC4qvzD-iD1NqgxMpmK),…
restserver [io-compute-4] DEBUG d.b.ops.OUpload - Storing jobs: Vector(RJob(Ident(GtWUbE8VSW1-3saEsDMfok1-M4FNZC4qvzD-iD1NqgxMpmK),Ident(process-item),I
dent(eike),{"meta":{"collective":"eike","itemId":null,"language":"deu"…
restserver [io-compute-1] ERROR d.s.q.JobQueue - Could not insert job. Skipping it.
restserver org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "job_pkey"
restserver   Detail: Key (jid)=(GtWUbE8VSW1-3saEsDMfok1-M4FNZC4qvzD-iD1NqgxMpmK) already exists.
restserver      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2552)

Jobs are tried to be stored with the same id.

@eikek eikek added bug Something isn't working or in unexpected ways restserver Affects the rest server. labels Jul 16, 2021
@eikek eikek added this to the Docspell 0.25.0 milestone Jul 16, 2021
@eikek
Copy link
Owner Author

eikek commented Jul 16, 2021

Probably the cause of docspell/android-client#32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or in unexpected ways restserver Affects the rest server.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant