[#100] s3: Support workflow with versioned buckets #177
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/xk6-frostfs#177
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "nzinkevich/xk6-frostfs:feat/versioned_bucket_ops"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add "versioning" parameter handling in CreateBucket
Add a DeleteVersion method for permanent deletion of bucket version. If
version
parameter is empty, this method deletes all versions and delete-markers of specified objectAdd "bucket_versioned" flag for
s3_preset.py
for setting percent of versioned buckets in case, when we want to create both versioned and non-versioned buckets. Note, that using--versioning
flag is the same as--buckets_versioned 100
and both flags shouldn't be use at the same timeCloses #100
@ -109,2 +109,3 @@
func (c *Client) Delete(bucket, key string) DeleteResponse {
func (c *Client) Delete(bucket, key string, allVersions bool) DeleteResponse {
start := time.Now()
if allVersions {
Discussed with @nzinkevich internally and decided to put this code into separate
DeleteVersion
commandNext step is to modify presets to create combined buckets.
2c58cbdd43
to7a4a4d441d
b8bc12ae6d
to4d28abd692
4d28abd692
to253d50637f
We need to decide default behavior of s3 present with DELETE workers.
Now it calls
Delete
and it leaves delete markers in bucket.We can call
DeleteObjectVersion
but it produces version listing, which may affect performance.Steps to reproduce
@ -145,0 +153,4 @@
VersionId: aws.String(version),
})
} else {
v, err := c.cli.GetBucketVersioning(c.vu.Context(), &s3.GetBucketVersioningInput{
I think we need to avoid calling
GetBucketVersioning
on every request, because K6 mostly works with the limited number of buckets. It is overhead to call it on every object.I think we can invoke
ListObjectVersions
. Then invokeDeleteObjects
and pass version id if it is not null. And that's it.@ -28,2 +29,3 @@
parser.add_argument('--location', help=f'AWS location constraint. Default is "{DEFAULT_LOCATION}"', action="append")
parser.add_argument('--versioning', help='True/False, False by default.')
parser.add_argument('--versioning', help='True/False, False by default. Alias of --buckets_versioned=100')
parser.add_argument('--buckets_versioned', help='Percent of versioned buckets. Default is 0', default=0)
Mention new parameters in
run_scenarios.md
253d50637f
to1d37df50fc
1d37df50fc
to124397578d
With @anikeev-yadro and @a.bogatyrev we've decided to keep
Delete
invocation in s3 scenarios for both versioned and non-versioned buckets.DeleteObjectVersion
may be used to clean-up buckets before bucket removal, but for regular tests we use directDelete
with no extra listings.