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

Stor: Duplicate links in a single path possible #192

Open
killua-eu opened this issue Feb 10, 2021 · 1 comment
Open

Stor: Duplicate links in a single path possible #192

killua-eu opened this issue Feb 10, 2021 · 1 comment
Assignees

Comments

@killua-eu
Copy link
Contributor

killua-eu commented Feb 10, 2021

How to reproduce:

  • upload file.txt to worklog/1.
  • upload file.txt to worklog/1 again.

Expected:

  • 1 entry in t_stor_objects
  • 1 entry in t_stor_links

Got

  • 1 entry in t_stor_objects
  • 2 entry in t_stor_links

Basically t_stor_links should be unique for given { c_filename , c_inherit_object , c_inherit_table , c_sha512 }. in t_stor_links, for a given c_sha512, c_filename should be unique for a {c_inherit_object, c_inherit_table} pair. Naturally, linking the same c_sha512 under a different c_filename or with the same c_filename but in different {c_inherit_object, c_inherit_table} should be possible.

Setup

HOST="https://10.146.149.150"
EMAIL="[email protected]"
PASS="[email protected]"
TOKEN=`curl -s -XPOST ${HOST}/api/core/v1/auth/signin -d "email=${EMAIL}&password=${PASS}" -k | jq -r .token`

Test

curl -k -H "Authorization: Bearer ${TOKEN}" -F 'actual_dir=worklog/5' -F 'upload_type=general' -F 'file[]=@./file1.txt' -F 'file[]=@./file2.txt' ... ${HOST}/api/stor/v1/upload
curl -k -H "Authorization: Bearer ${TOKEN}" -F 'actual_dir=worklog/5' -F 'upload_type=general' -F 'file[]=@./file1.txt' -F 'file[]=@./file2.txt' ... ${HOST}/api/stor/v1/upload
@pohadkar
Copy link
Collaborator

u klasickeho uploadu jsem to poresil.
neni zatim vyreseno u move copy.
pokud by soubor uz existoval v cilovem adresari,
move by vedlo k tomu ze soubor jen zmizi z puvodniho.
a copy by vedlo k tomu ze se nestane nic.
nevim jestli to je zadane chovani.

killua-eu added a commit that referenced this issue Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants