native client: Add NetworkInfo cache #147

Merged
fyrchik merged 1 commit from dstepanov-yadro/xk6-frostfs:feat/network_info_cache into master 2024-06-17 07:19:13 +00:00

Closes #146

Closes #146
dstepanov-yadro added 1 commit 2024-06-17 06:33:29 +00:00
[#146] native: Add NetworkInfo cache
All checks were successful
DCO action / DCO (pull_request) Successful in 1m18s
Tests and linters / Tests (1.22) (pull_request) Successful in 3m24s
Tests and linters / Tests with -race (pull_request) Successful in 3m36s
Tests and linters / Tests (1.21) (pull_request) Successful in 3m46s
Tests and linters / Lint (pull_request) Successful in 4m25s
3bc1229062
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
dstepanov-yadro requested review from storage-core-committers 2024-06-17 06:46:41 +00:00
dstepanov-yadro requested review from storage-core-developers 2024-06-17 06:46:41 +00:00
acid-ant approved these changes 2024-06-17 07:16:05 +00:00
fyrchik approved these changes 2024-06-17 07:17:08 +00:00
achuprov approved these changes 2024-06-17 07:19:11 +00:00
fyrchik merged commit 3bc1229062 into master 2024-06-17 07:19:13 +00:00
elebedeva reviewed 2024-06-17 07:31:39 +00:00
@ -0,0 +41,4 @@
c.guard.Lock()
defer c.guard.Unlock()
if time.Since(c.fetchTS) <= networkCacheTTL {
Member

Isn't this check redundant? c.fetch() is called after get already checked time since last fetch.

Isn't this check redundant? `c.fetch()` is called after get already checked time since last fetch.
elebedeva marked this conversation as resolved
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
5 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#147
No description provided.