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

Tracking issues of RFC-5313: Remove Metakey #5314

Open
2 of 3 tasks
Xuanwo opened this issue Nov 12, 2024 · 6 comments · May be fixed by #5472
Open
2 of 3 tasks

Tracking issues of RFC-5313: Remove Metakey #5314

Xuanwo opened this issue Nov 12, 2024 · 6 comments · May be fixed by #5472
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Xuanwo
Copy link
Member

Xuanwo commented Nov 12, 2024

Tasks

@geetanshjuneja
Copy link

@Xuanwo I can take this task.
Do I have to set stat_has_* and list_has_* fields in capability struct passed to fn call to set_native_capability in every service?

@Xuanwo
Copy link
Member Author

Xuanwo commented Dec 27, 2024

@Xuanwo I can take this task. Do I have to set stat_has_* and list_has_* fields in capability struct passed to fn call to set_native_capability in every service?

Yes! Please set the flags based on the metadata we specified in stat and list. I really appreciate seeing you handle it.

@geetanshjuneja
Copy link

Please set the flags based on the metadata we specified in stat and list

Are you talking about the metadata struct in Rpstat which is the return type of stat? If yes then how to decide whether the flag is true or false.

@Xuanwo
Copy link
Member Author

Xuanwo commented Dec 27, 2024

Are you talking about the metadata struct in Rpstat which is the return type of stat? If yes then how to decide whether the flag is true or false.

For example, s3 set the following keys during list:

let mut meta = Metadata::new(EntryMode::from_path(&path));
if let Some(etag) = &object.etag {
meta.set_etag(etag);
meta.set_content_md5(etag.trim_matches('"'));
}
meta.set_content_length(object.size);
// object.last_modified provides more precise time that contains
// nanosecond, let's trim them.
meta.set_last_modified(parse_datetime_from_rfc3339(object.last_modified.as_str())?);

We should set list_has_{etag,content_md5,content_length,last_modified} to true.

@geetanshjuneja
Copy link

geetanshjuneja commented Dec 27, 2024

In some services in stat fn metadata is obtained using parse_into_metadata fn

https://github.com/apache/opendal/blob/86d6c42051a338142225c06a49d7ea7d019b0e92/core/src/raw/http_util/header.rs#L156C1-L201C2

In this case I have to set all stat_has_* flags to true?

@Xuanwo
Copy link
Member Author

Xuanwo commented Dec 27, 2024

In this case I have to set all stat_has_* flags to true?

Most (those one set by this function), but not all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
2 participants