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

Bug: uploading two same files at the same time reports an error #135

Closed
withchao opened this issue Jul 19, 2023 · 0 comments · Fixed by #139
Closed

Bug: uploading two same files at the same time reports an error #135

withchao opened this issue Jul 19, 2023 · 0 comments · Fixed by #139
Labels
bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@withchao
Copy link
Contributor

What happened?

[PID:79057]�[0m [log/sql_logger.go:57] sql exec detail {"operationID": "1689769134668", "gorm": "open_im_sdk@v0.0.0-00010101000000-000000000000/pkg/db/upload_model.go:41", "elapsed time": "2.958333(ms)", "rows": 0, "sql": "INSERT INTO local_uploads (part_hash,upload_id,upload_info,expire_time,create_time) VALUES ("eef2f6fcf1e06c245514270fbd0fb284","eyJhIjoyLCJjIjoib3BlbmltL3RlbXAvMjAyMy8wNy8xOS8yMC8xOC81NS9lZWYyZjZmY2YxZTA2YzI0NTUxNDI3MGZiZDBmYjI4NF83MTcyNjRfZTMxNzJkOTUyNzZmNGM1NmE0YjhiNGI4M2JiOTJlMGMucHJlc2lnbmVkIiwiZCI6NzE3MjY0LCJlIjoiZWVmMmY2ZmNmMWUwNmMyNDU1MTQyNzBmYmQwZmIyODQifQ==","AAAAAAAAAAA=",1690373935039,1689769134987)", "error": "UNIQUE constraint failed: local_uploads.part_hash"}
2023-07-19 12:18:55.006 �[31mERROR�[0m �[31m[PID:79057]�[0m [open_im_sdk/util.go:163] fn call error {"operationID": "1689769134668", "function name": "open_im_sdk/internal/file.(*File).UploadFile-fm", "cost time": 0.328061, "error": "UNIQUE constraint failed: local_uploads.part_hash"}

What did you expect to happen?

continue uploading

How can we reproduce it (as minimally and precisely as possible)?

cannot upload the same file at the same time

Anything else we need to know?

No response

version

```console $ {name} version # paste output here v3 ```

Cloud provider

sdk

OS version

```console # On Linux: $ cat /etc/os-release # paste output here $ uname -a # paste output here # On Windows: C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture # paste output here ```

Install tools

@withchao withchao added the bug Categorizes issue or PR as related to a bug. label Jul 19, 2023
@FGadvancer FGadvancer added this to the v3.0 milestone Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants