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

refactor(core): move move logic from fn metadata(&self) -> Arc<AccessorInfo> to impl<A: Access> Layer<A> for CompleteLayer #4896

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Lzzzzzt
Copy link
Contributor

@Lzzzzzt Lzzzzzt commented Jul 14, 2024

Which issue does this PR close?

Closes #4888

What changes are included in this PR?

mentioned in #4888

Are there any user-facing changes?

No

@Lzzzzzt Lzzzzzt marked this pull request as draft July 14, 2024 03:35
@@ -382,7 +389,7 @@ impl<A: Access> LayeredAccess for CompleteAccessor<A> {

// Todo: May move the logic to the implement of Layer::layer of CompleteAccessor<A>
fn metadata(&self) -> Arc<AccessorInfo> {
let mut meta = (*self.meta).clone();
let mut meta = self.meta.as_ref().clone();
let cap = meta.full_capability_mut();
if cap.list && cap.write_can_empty {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can remove those code and the comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we do this, the issue #4888 is not resolved....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we do this, the issue #4888 is not resolved....

Could you elaborate further? I'm not sure which issue remains unresolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can remove those code and the comment?

you means delete the

// Todo: May move the logic to the implement of Layer::layer of CompleteAccessor<A>

and

let mut meta = self.meta.as_ref().clone();

?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, since we have created the Arc<AccessInfo> during layer(), we can remove the dup code here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's my problem, sry.

yuchanns and others added 4 commits July 16, 2024 15:19
* feat(user_metadata): support user defined metadata for oss

* fix cargo fmt && doc tests

* Add user metadata key checks for oss && refeactor some code

* remove unused code
@Xuanwo
Copy link
Member

Xuanwo commented Jul 16, 2024

The C/C++ test failed, which is a bit weird. I'll try to figure out what happened. I'm guessing it's related to our Arc been dropped while C still hold it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

idea: move logic from fn metadata(&self) -> Arc<AccessorInfo> to impl<A: Access> Layer<A> for CompleteLayer
4 participants