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

fix the upload postprocessing when the destination file does not exis… #4434

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

2403905
Copy link

@2403905 2403905 commented Dec 22, 2023

Fix the upload postprocessing when the destination file does not exist anymore.

Describe the bug

When a file gets deleted before the postprocessing the destination and blob file are not found and BlobID is empty
owncloud/ocis#7909

Steps to reproduce

folder='ff'
file2='ff2.txt'
# get the drive id
driveid=`curl -ku admin:admin https://host.docker.internal:9200/graph/v1.0/me/drives | jq -c '.[] | .[] | select(.driveAlias | contains("personal")) | .id' -r`

# create a folder
curl -ku admin:admin -XMKCOL 'https://host.docker.internal:9200/dav/spaces/'$driveid'/'$folder

# create, delete, and overwrite the same file 
curl -ku admin:admin -XPUT -d"content" 'https://host.docker.internal:9200/dav/spaces/'$driveid'/'$folder'/'$file2
curl -ku admin:admin -XDELETE 'https://host.docker.internal:9200/dav/spaces/'$driveid'/'$folder'/'$file2

Expected behavior

ff2.txt is not found, and the upload is interrupted.

Actual behavior

The post-processing tries to handle the upload

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

POSTPROCESSING_DELAY=10s PROXY_ENABLE_BASIC_AUTH=true OCIS_INSECURE=true PROXY_HTTP_ADDR=0.0.0.0:9200 OCIS_URL=https://host.docker.internal:9200 PROXY_TRANSPORT_TLS_KEY=./ocis.pem PROXY_TRANSPORT_TLS_CERT=./ocis.crt ./ocis/bin/ocis server

Additional context

logs:

{"level":"error","error":"decomposedfs: root has no parent","uploadID":"0645d53a-355c-4aca-9cb5-2177d11c582e","time":"2023-12-07T17:36:02+05:45","message":"could not propagate tree size change"}
{"level":"error","error":"failed to upload file to blobstore: could not open blob '~/.ocis/storage/users/spaces/00/364da3-abb6-47d0-8002-6cd66ed6eea5/blobs' for writing: open ~/.ocis/storage/users/spaces/00/364da3-abb6-47d0-8002-6cd66ed6eea5/blobs: is a directory","uploadID":"1d13ffb8-24bf-4fdd-b321-d5c774fcf353","time":"2023-12-07T17:36:32+05:45","message":"could not finalize upload"}

Copy link

update-docs bot commented Dec 22, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@butonic butonic merged commit e854418 into cs3org:edge Jan 4, 2024
9 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants