-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use runtime.GC for reducing indexing memory & replace saveMu with atomic busy loop for race control #682
Conversation
[CHATOPS:HELP] ChatOps commands.
|
Best reviewed: commit by commit
Optimal code review plan
|
Codecov Report
@@ Coverage Diff @@
## master #682 +/- ##
==========================================
- Coverage 15.55% 15.02% -0.54%
==========================================
Files 412 417 +5
Lines 21626 22127 +501
==========================================
- Hits 3364 3324 -40
- Misses 18022 18554 +532
- Partials 240 249 +9
Continue to review full report at Codecov.
|
How about to add options for enabling/disabling |
/rebase |
[REBASE] Rebase triggered by rinx for branch: performance/agent/use-userdefined-gc-call |
Signed-off-by: kpango <[email protected]>
Signed-off-by: kpango <[email protected]>
Signed-off-by: kpango <[email protected]>
2b950ac
to
7ea859e
Compare
…untor Signed-off-by: kpango <[email protected]>
How do you think about this comment? @kpango |
sounds nice, I'll do that for now, by the way could you please test this branch? |
@rinx do we need divide enbale/disable configuration into before and after? |
saveMu sync.Mutex // creating or saving index | ||
indexing atomic.Value | ||
saving atomic.Value | ||
lastNoice uint64 // last number of create index execution this value prevent unnecessary saveindex. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! 👍
I've just imagined it like that. 👍 |
[WARNING:INTCFG] Changes in |
Signed-off-by: kpango <[email protected]>
4a5ff85
to
c22261d
Compare
Signed-off-by: kpango <[email protected]>
Signed-off-by: kpango <[email protected]>
@rinx could you please review it? you don't need to review test code it's generated by make gotest/patch |
Signed-off-by: kpango <[email protected]>
Signed-off-by: kpango <[email protected]>
Signed-off-by: kpango <[email protected]>
*/ | ||
} | ||
|
||
for _, test := range tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
copylocks: range var test copies lock: github.com/vdaas/vald/internal/observability/metrics/db/kvs/redis.test contains github.com/vdaas/vald/internal/observability/metrics/db/kvs/redis.fields contains sync.Mutex (govet)
pipelineLatency: test.fields.pipelineLatency, | ||
cmdNameKey: test.fields.cmdNameKey, | ||
numCmdKey: test.fields.numCmdKey, | ||
mu: test.fields.mu, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
copylocks: literal copies lock value from test.fields.mu: sync.Mutex (govet)
*/ | ||
} | ||
|
||
for _, test := range tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
copylocks: range var test copies lock: github.com/vdaas/vald/internal/observability/metrics/db/kvs/redis.test contains github.com/vdaas/vald/internal/observability/metrics/db/kvs/redis.fields contains sync.Mutex (govet)
pipelineLatency: test.fields.pipelineLatency, | ||
cmdNameKey: test.fields.cmdNameKey, | ||
numCmdKey: test.fields.numCmdKey, | ||
mu: test.fields.mu, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
copylocks: literal copies lock value from test.fields.mu: sync.Mutex (govet)
*/ | ||
} | ||
|
||
for _, test := range tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
copylocks: range var test copies lock: github.com/vdaas/vald/internal/observability/metrics/db/kvs/redis.test contains github.com/vdaas/vald/internal/observability/metrics/db/kvs/redis.fields contains sync.Mutex (govet)
} | ||
|
||
func Test_mysqlMetrics_View(t *testing.T) { | ||
type fields struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
struct of size 56 bytes could be of size 48 bytes (maligned)
*/ | ||
} | ||
|
||
for _, test := range tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
copylocks: range var test copies lock: github.com/vdaas/vald/internal/observability/metrics/db/rdb/mysql.test contains github.com/vdaas/vald/internal/observability/metrics/db/rdb/mysql.fields contains sync.Mutex (govet)
*/ | ||
} | ||
|
||
for _, test := range tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
copylocks: range var test copies lock: github.com/vdaas/vald/internal/observability/metrics/db/rdb/mysql.test contains github.com/vdaas/vald/internal/observability/metrics/db/rdb/mysql.fields contains sync.Mutex (govet)
*/ | ||
} | ||
|
||
for _, test := range tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
copylocks: range var test copies lock: github.com/vdaas/vald/internal/observability/metrics/db/rdb/mysql.test contains github.com/vdaas/vald/internal/observability/metrics/db/rdb/mysql.fields contains sync.Mutex (govet)
@@ -3604,31 +3843,208 @@ func Test_ngt_insertCache(t *testing.T) { | |||
} | |||
} | |||
|
|||
func Test_ngt_IsSaving(t *testing.T) { | |||
type fields struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golangci] reported by reviewdog 🐶
struct of size 248 bytes could be of size 224 bytes (maligned)
Others LGTM. |
and please write the description of this PR. |
Co-authored-by: Rintaro Okamura <[email protected]>
Signed-off-by: kpango [email protected]
Description:
this PR includes 2 feature
Related Issue:
How Has This Been Tested?:
Environment:
Types of changes:
Changes to Core Features:
Checklist: