Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Comments

Implement GSP-134 & GSP-654#43

Merged
xxchan merged 8 commits intomasterfrom
bump-go-storage
Jul 21, 2021
Merged

Implement GSP-134 & GSP-654#43
xxchan merged 8 commits intomasterfrom
bump-go-storage

Conversation

@JinnyYi
Copy link
Contributor

@JinnyYi JinnyYi commented Jul 19, 2021

No description provided.

dependabot bot and others added 5 commits July 15, 2021 23:08
Bumps [github.com/beyondstorage/go-integration-test/v4](https://github.com/beyondstorage/go-integration-test) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/beyondstorage/go-integration-test/releases)
- [Changelog](https://github.com/beyondstorage/go-integration-test/blob/master/CHANGELOG.md)
- [Commits](beyondstorage/go-integration-test@v4.1.1...v4.2.0)

---
updated-dependencies:
- dependency-name: github.com/beyondstorage/go-integration-test/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: xxchan <37948597+xxchan@users.noreply.github.com>
options = append(options, oss.ServerSideEncryptionKeyID(opt.ServerSideEncryptionKeyID))
}

offset, err := s.bucket.AppendObject(rp, nil, 0, options...)
Copy link
Contributor

Choose a reason for hiding this comment

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

This API call is removed (so won't create an empty object?). Is this expected?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original intention of creating an empty object in CreateAppend is to set the object system metadata at the first append request. You can refer here for more details.
Actually there's no requirement to create an empty object for CreateAppend, so I removed the API call to reduce a request.

Copy link
Contributor

Choose a reason for hiding this comment

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

The discussion says that if we cannot create an empty object, we use metadata.
You mean that we can simply use metadata? This LGTM, but I'm not sure if there is further consideration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean that we can simply use metadata? This LGTM, but I'm not sure if there is further consideration.

I'm not sure whether we should ensoure that the object can be retrieved from server after CreateAppend. Or just create an appendable Object for users to call WriteAppend?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure whether we should ensoure that the object can be retrieved from server after CreateAppend. Or just create an appendable Object for users to call WriteAppend?

I think it's not safe. For example, user call CreateAppend() but failed on next WriteAppend call. So, it's impossible for him to Stat() and resume the append process.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. I'll change back to create an empty object in CreateAppend.

storage.go Outdated
if err != nil {
return
}
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't have else here? (if exist, delete and then create)

@xxchan xxchan merged commit 82de263 into master Jul 21, 2021
@xxchan xxchan deleted the bump-go-storage branch July 21, 2021 10:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants