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

Errored file creation results in a taken ID #332

Open
tagliala opened this issue Jan 17, 2025 · 1 comment
Open

Errored file creation results in a taken ID #332

tagliala opened this issue Jan 17, 2025 · 1 comment
Labels

Comments

@tagliala
Copy link
Member

tagliala commented Jan 17, 2025

How to replicate

$ curl -X PUT http://localhost:9240/document/myapp/123456/myfile.txt
{"status":400,"description":"Invalid parameter file"}

$ curl -X PUT http://localhost:9240/document/myapp/123456/myfile.txt
{"status":409,"description":"A document with this doc_id already exists"}

Expected

ID not being taken

Actual

ID taken

@tagliala
Copy link
Member Author

The problem is the following:

  1. The document object is "always created"
  2. The document is being uploaded to that folder
  3. If the upload fails, it raises

However, we cannot rely on the raised error to decide whether if a file should be deleted, because you may have a temporary 500 error, and we don't want that a create deletes a file

We should understand how to do this, at the moment I will consider this a limitation of Colore

@tagliala tagliala added the bug label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant