Read objects from registry #86
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/xk6-frostfs#86
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/xk6-frostfs:feat/use_registry_for_read"
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?
If
registry_file
is specified, then reading will be performed from it. The objects will be read in a circle.Closes #25
c854f52f5b
to0cffff1fa6
@ -93,3 +93,3 @@
}
func (o *ObjSelector) selectLoop() {
func (o *ObjSelector) selectLoop(maxDuration time.Duration) {
If registry file is empty,
NextObject()
will be blocked forever.teardown
waits workers to finish.Isn't it a bug? It seems we
close(o.objChan)
in theselectLoop()
and exit from it via the context.According NextObject comment, it is expected behaviour.
Replaced with timeout in NextObject method.
To me the problem is here:
This should happen if we don't have any objects, right?
@ -164,3 +169,3 @@
// no more objects, wait a little; the logic could be improved.
select {
case <-time.After(time.Second * time.Duration(o.filter.Age/2)):
case <-time.After(time.Second):
For READ scenario there is no age, so just wait for 1 second.
0cffff1fa6
tocdbfa1a40e
@ -46,3 +46,3 @@
var comma string
for i := 0; i < count; i++ {
info := o.selector.NextObject()
info := o.selector.NextObject(5)
Why is it
5
? :) How did you adjust this parameter?Expert evaluation method
@ -152,0 +166,4 @@
if (!obj) {
return;
}
const resp = grpc_client.get(obj.c_id, obj.o_id)
Can we add the same for s3 scenarios?
Done
cdbfa1a40e
to0dc0ba1704
@ -55,9 +55,45 @@ func NewObjSelector(registry *ObjRegistry, selectionSize int, filter *ObjFilter)
// - underlying registry context is done, nil objects will be returned on the
// currently blocked and every further NextObject calls.
func (o *ObjSelector) NextObject() *ObjectInfo {
if !o.hasAnyObj() {
Wow, if we call it on each next this should have noticeable impact on the performance (we iterate over the database).
ok, removed
e52ca33fbc
to704c0f06bc
LGTM, didn't run