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

the reva share manager is inefficient #3839

Closed
butonic opened this issue May 19, 2022 · 3 comments
Closed

the reva share manager is inefficient #3839

butonic opened this issue May 19, 2022 · 3 comments
Assignees
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug

Comments

@butonic
Copy link
Member

butonic commented May 19, 2022

stats every shared resource

	// TODO: This is a hack for now.
	// Can we do that cleaner somehow?
	// The `ListStorageSpaces` method in sharesstorageprovider/sharesstorageprovider.go needs the etags.
	shareMetaData := make(map[string]share.Metadata, len(res.Shares))
	for _, rs := range res.Shares {
		// Stat .. here, only for etag and mtime? and then we throw the rest away?
		sRes, err := s.Stat(ctx, &provider.StatRequest{Ref: &provider.Reference{ResourceId: rs.Share.ResourceId}})
		if err != nil {
			logger.Error().
				Err(err).
				Interface("resourceID", rs.Share.ResourceId).
				Msg("ListRecievedShares: failed to stat the resource")
			continue
		}
		if sRes.Status.Code != rpc.Code_CODE_OK {
			logger.Error().
				Interface("resourceID", rs.Share.ResourceId).
				Msg("ListRecievedShares: failed to stat the resource")
			continue
		}
		shareMetaData[rs.Share.Id.OpaqueId] = share.Metadata{ETag: sRes.Info.Etag, Mtime: sRes.Info.Mtime}
	}

The sharesstorageproevider not only needs the etag and mtime. It may need a full stat response to build the virtual share jail #3719

The sharesstorageprovider should make the stat requests itself. PR in cs3org/reva#2885

And it can omit that for unmounted shares ... which brings us to the next issue...

cannot filter by un/accepted shares

When listing mountpoints unaccepted shares can be omitted. The CS3 API needs a filter to allow filtering.
tracked in #3843

@butonic
Copy link
Member Author

butonic commented May 19, 2022

also: cs3org/reva#2881

@butonic butonic added Priority:p1-urgent Consider a hotfix release with only that fix Priority:p2-high Escalation, on top of current planning, release blocker and removed Priority:p1-urgent Consider a hotfix release with only that fix labels May 19, 2022
@butonic butonic self-assigned this May 20, 2022
@micbar
Copy link
Contributor

micbar commented Jul 13, 2022

@butonic is this enough?

@micbar
Copy link
Contributor

micbar commented Sep 14, 2022

Done by #4431 and #4436 and #4539 and #4430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug
Projects
Archived in project
Development

No branches or pull requests

2 participants