native client: Add NetworkInfo cache #147

Merged
fyrchik merged 1 commits 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
DCO action / DCO (pull_request) Successful in 1m18s Details
Tests and linters / Tests (1.22) (pull_request) Successful in 3m24s Details
Tests and linters / Tests with -race (pull_request) Successful in 3m36s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 3m46s Details
Tests and linters / Lint (pull_request) Successful in 4m25s Details
3bc1229062
[#146] native: Add NetworkInfo cache
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 {
Collaborator

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.
There is no content yet.