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

Specify the behavior of List #651

Closed
Xuanwo opened this issue Jul 6, 2021 · 7 comments
Closed

Specify the behavior of List #651

Xuanwo opened this issue Jul 6, 2021 · 7 comments
Assignees

Comments

@Xuanwo
Copy link
Contributor

Xuanwo commented Jul 6, 2021

Here are two problems:

  • Service doesn't have a default value for ListMode
  • Do we need to check virtual_dir while ListMode is ModeDir?
@JinnyYi
Copy link
Contributor

JinnyYi commented Jul 6, 2021

  • Service doesn't have a default value for ListMode

I wonder whether the default ListMode is different for specific service.
We don't need the ListMode parameter like go-service-fs. And for object storage like s3, the default ListMode should be ListModePrefix.

@Xuanwo
Copy link
Contributor Author

Xuanwo commented Jul 6, 2021

I wonder whether the default ListMode is different for specific service.

Yes. The default ListMode could be different for different services.

  • For fs: could be ListModeDir (maybe we can implement virtual_list_prefix for fs?)
  • Fo3 s3: could be ListModePrefix

@JinnyYi
Copy link
Contributor

JinnyYi commented Jul 6, 2021

  • For fs: could be ListModeDir (maybe we can implement virtual_list_prefix for fs?)

I'm not sure the expected operation and results for virtual_list_prefix.

@Xuanwo
Copy link
Contributor Author

Xuanwo commented Jul 6, 2021

I'm not sure the expected operation and results for virtual_list_prefix.

With virtual_list_prefix, we will implement prefix listing for fs. (I don't whether we need to do this too)

Maybe we can require all services to implement ListModeDir without the check for virtual_dir.

@JinnyYi
Copy link
Contributor

JinnyYi commented Jul 8, 2021

With virtual_list_prefix, we will implement prefix listing for fs. (I don't whether we need to do this too)

Maybe there's no need to implement virtual_list_prefix for fs?

  • Seems that we need to list files under the directory first then filter file names according to the prefix. Maybe ListModeDir is enough?
  • If we support prefix listing for fs, the parameter path could not carry enough information. We need to check wether path is an existing dir or a dir + prefix?

@Xuanwo
Copy link
Contributor Author

Xuanwo commented Jul 8, 2021

Makes sense. Let's drop out list prefix support for fs until there is a user who requests this feature.

@Xuanwo Xuanwo transferred this issue from beyondstorage/specs Jul 9, 2021
@xxchan
Copy link
Contributor

xxchan commented Jul 13, 2021

RFC #654

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

3 participants