Repository navigation
Description
When the blob of a user's received.json in the share manager metadata is missing and the node is not marked as processing, that user is stuck for good:
DownloadskipsrecoverInterruptedUpload()andReadBlobfails with a wrappedos.Openerror, notNotFoundreceivedsharecache.syncWithLock()only toleratesNotFoundandNotModified, so it returns the errorListReceivedSharesfails on every request andAddfails as well, because it syncs first
dlres, err := c.storage.Download(ctx, metadata.DownloadRequest{
Path: jsonPath,
IfNoneMatch: []string{rss.etag},
})
switch err.(type) {
case nil:
span.AddEvent("updating local cache")
case errtypes.NotFound:
span.SetStatus(codes.Ok, "")
return nil
case errtypes.NotModified:
span.SetStatus(codes.Ok, "")
return nil
default:
// ...
return err
}Admins have no proper way out. received.json lives in the system storage, so there is no API for it. opencloud decomposedfs metadata can only get and set attributes, and storage-users uploads delete-stale-nodes only handles processing nodes in the users storage. The only workaround is stopping opencloud and either writing {} to the blob path or deleting the node by hand. Both lose the share states, and direct user shares vanish from the recipient's "shared with me" until they are shared again.
How the blob went missing in the first place is still open. In oCIS it was a full disk during the upload; with opencloud-eu/reva#976 the system storage writes the blob before pointing the node to it, so this might only affect nodes left over from older versions.
We could rebuild the received states from the providercache, because the <spaceID>.json files contain all shares with their grantees:
- a) do it in reva: when
syncWithLockhits a missing blob, rebuild the user's received states from the providercache and persist them (I'd prefer this, no admin needed) - b) add an
opencloud shares rebuild-receivedCLI, like upstream tried in Feat: [OCISDEV-439] CLI, fix missing blobs with received.json owncloud/ocis#11756
The original state (accepted, hidden, mountpoint) is lost either way. Rebuilt shares would come back as pending, or accepted if auto accept is on.
- map
ReadBlobon a missing blob to a dedicated error in decomposedfs - rebuild the received states from the providercache
- test with a
received.jsonnode pointing to a missing blob
Activity