selector: Add agent synchronization in Oneshot mode #158

Merged
fyrchik merged 1 commit from achuprov/xk6-frostfs:bugfix/153 into master 2024-09-10 09:29:34 +00:00
Member

Close #153

Close #153
achuprov added 1 commit 2024-07-26 11:26:15 +00:00
[#153] selector: Add agent synchronization in Oneshot mode
Some checks failed
Tests and linters / Tests (1.22) (pull_request) Successful in 2m37s
Tests and linters / Lint (pull_request) Successful in 5m5s
DCO action / DCO (pull_request) Failing after 45s
Tests and linters / Tests with -race (pull_request) Successful in 1m48s
Tests and linters / Tests (1.21) (pull_request) Successful in 2m9s
1766e88839
achuprov force-pushed bugfix/153 from 1766e88839 to 62c69f4afd 2024-07-26 11:44:20 +00:00 Compare
fyrchik requested changes 2024-07-26 12:51:21 +00:00
Dismissed
@ -31,3 +33,3 @@
// NewObjSelector creates a new instance of object selector that can iterate over
// objects in the specified registry.
func NewObjSelector(registry *ObjRegistry, selectionSize int, kind SelectorKind, filter *ObjFilter) *ObjSelector {
// countAgents specifies the number of agents involved in data selection.
Owner

It seems to be the wrong level of abstraction. Selector's job is to select data and provide a stream irregardless of how it is used.
The problem is in scenario (because that is where abort is called).

It seems to be the wrong level of abstraction. Selector's job is to select data and provide a stream irregardless of how it is used. The problem is in scenario (because that is where `abort` is called).
Author
Member

You're right. But I think the selector should provide the functionality to synchronize VU.

You're right. But I think the `selector` should provide the functionality to synchronize `VU`.
achuprov marked this conversation as resolved
achuprov force-pushed bugfix/153 from 62c69f4afd to becacd4251 2024-07-29 14:01:42 +00:00 Compare
achuprov force-pushed bugfix/153 from becacd4251 to d15f6550b2 2024-07-29 14:08:57 +00:00 Compare
achuprov requested review from fyrchik 2024-07-29 14:09:20 +00:00
fyrchik requested changes 2024-07-30 07:40:47 +00:00
Dismissed
@ -23,6 +24,7 @@ type ObjSelector struct {
filter *ObjFilter
cacheSize int
kind SelectorKind
sinc sync.WaitGroup
Owner

What is sinc? I know sync and sink only.

What is `sinc`? I know `sync` and `sink` only.
achuprov marked this conversation as resolved
@ -106,2 +108,4 @@
}
// SetCountVU sets the number of VUs that will work with this selector
func (o *ObjSelector) SetCountVU(count int) {
Owner

It is a basic waitgroup, why is the field attached to an ObjSelector?

It is a basic waitgroup, why is the field attached to an `ObjSelector`?
achuprov marked this conversation as resolved
aarifullin reviewed 2024-08-20 09:22:12 +00:00
@ -108,0 +113,4 @@
o.sinc.Add(count)
}
// SincVU allows synchronizing VUs that use this selector
Member

Please, make this comment (and above one) end with dot .

Please, make this comment (and above one) end with dot `.`
achuprov marked this conversation as resolved
achuprov force-pushed bugfix/153 from d15f6550b2 to 117afd5f7c 2024-09-09 15:44:02 +00:00 Compare
achuprov force-pushed bugfix/153 from 117afd5f7c to 104aa5ef96 2024-09-09 15:44:36 +00:00 Compare
achuprov force-pushed bugfix/153 from 104aa5ef96 to 2b4d12dc91 2024-09-09 15:46:20 +00:00 Compare
achuprov requested review from storage-core-committers 2024-09-09 16:04:18 +00:00
achuprov requested review from storage-core-developers 2024-09-09 16:04:18 +00:00
fyrchik approved these changes 2024-09-10 03:34:43 +00:00
Dismissed
fyrchik reviewed 2024-09-10 03:35:11 +00:00
@ -44,6 +47,7 @@ func NewObjSelector(registry *ObjRegistry, selectionSize int, kind SelectorKind,
objChan: make(chan *ObjectInfo, selectionSize*2),
cacheSize: selectionSize,
kind: kind,
Sync: sync.WaitGroup{},
Owner

It is not a pointer, so the default value is ok, can omit this line

It is not a pointer, so the default value is ok, can omit this line
achuprov force-pushed bugfix/153 from 2b4d12dc91 to bede693470 2024-09-10 08:56:56 +00:00 Compare
achuprov dismissed fyrchik's review 2024-09-10 08:56:58 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

acid-ant approved these changes 2024-09-10 08:59:30 +00:00
fyrchik approved these changes 2024-09-10 09:29:30 +00:00
fyrchik merged commit bede693470 into master 2024-09-10 09:29:34 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/xk6-frostfs#158
No description provided.