Abstract network communication in TreeClient #59
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 project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#59
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
In TrueCloudLab/xk6-frostfs#14 K6 generator wants to fill tree service with data as fast and as close to real S3 Gateway as possible. To do that, K6 generator may use
TreeClient
instance frominternal/frostfs/tree.go
. However,TreeClient
is set to use real gRPC connection and sign gRPC requests, which is not quite optimal for original issue.TreeClient
implementation can use an interface for network communication with tree service, and K6 can implement such interface with direct access to the tree forest structures in the file system.Besides the interface, we have to move
frostfs
package out ofinternal
package, so it can be imported into K6.Let's discuss, is it exactly what we want to do or maybe there are different proposals. /cc @fyrchik @ale64bit
Also I invite @dkirillov to give us some code examples how it can be implemented.
Proposed interface that should be implemented
data.BucketInfo
is a struct that contains some container info. In current implementaion we use only two field from this structCID
andOwner
so probably we can define a new struct with only these two fieldsThe tree client can be used then as follow:
where instead of
treeGRPCClient
we can use any other implementaion.Here you can see all methods in addition to
AddVersion
(from message above) that can be used5c62010331/api/layer/tree_service.go