[#14] Add s3 local loader #48
No reviewers
TrueCloudLab/storage-services-developers
TrueCloudLab/storage-services-committers
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/xk6-frostfs#48
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "ale64bit/xk6-frostfs:feature/14-local_s3"
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?
Signed-off-by: Alejandro Lopez a.lopez@yadro.com
@ -0,0 +22,4 @@
type (
SuccessOrErrorResponse struct {
Success bool
Why isn't just an
error
? Why do we need this type?Because all methods that return this type (or similar) are used in JavaScript side, so a compatible type (and number of return values) must be used.
See e.g. #48/files
A bit of context:
This PR implements a local k6 loader implementation for S3 use-cases, as described in #14. Specifically, it can be used to stop services in a given cluster and fill each node independently and without network usage.
In order to do so, the S3 gateway layer implementation is used directly, which is why a sufficient implementation of the following is needed and included in this PR:
More info is included about these as code comments.
Additionally, the original local scenario implementation is refactored (into
rawclient
package in this PR) so that it can be reused in this scenario as well.@ -1,5 +1,5 @@
import {uuidv4} from 'https://jslib.k6.io/k6-utils/1.2.0/index.js';
import {fail} from 'k6'
import { uuidv4 } from './scenarios/libs/k6-utils-1.4.0.js';
Seems unrelated, can we have a separate commit for this?
done. Let's do a separate PR.
But why not here, seems like a good addition?
@ -5,3 +5,2 @@
require (
git.frostfs.info/TrueCloudLab/frostfs-node v0.22.2-0.20230313113918-4e244686cf03
git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20230307124721-94476f905599
git.frostfs.info/TrueCloudLab/frostfs-node v0.22.2-0.20230331063259-ed28ce24cd5e
And for this too.
done
@ -0,0 +39,4 @@
// WithPutHandler sets the hook invoked on completion of Put calls.
// This is useful for updating metrics or debugging.
func WithPutHandler(h putHandler) Option { return func(c *config) { c.onPut = h } }
Why are these functions written in 1 line and
WithKey
in 4, what's the difference?done
@ -0,0 +43,4 @@
// WithGetHandler sets the hook invoked on completion of Get calls.
// This is useful for updating metrics or debugging.
func WithGetHandler(h getHandler) Option { return func(c *config) { c.onGet = h } }
Can we avoid using parameters of private types for exported methods?
done
@ -0,0 +15,4 @@
func newFixedBucketResolver(bucketMapping map[string]string) (fixedBucketResolver, error) {
r := fixedBucketResolver{}
for bucket, cidStr := range bucketMapping {
id := &cid.ID{}
Do you prefer this to
var id cid.ID
?done (I don't prefer it, it's an oversight)
41f0ed808d
to14cc78dbc3
14cc78dbc3
to11efc73678