Skip to content
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

fix: metrics stored_index_files_size is never cleared #36161

Merged

Conversation

jaime0815
Copy link
Contributor

issue: ##36159
pr: #36160

@sre-ci-robot sre-ci-robot added the size/S Denotes a PR that changes 10-29 lines. label Sep 10, 2024
@mergify mergify bot added dco-passed DCO check passed. kind/bug Issues or changes related a bug labels Sep 10, 2024
@jaime0815 jaime0815 changed the title fix: metrics stored_index_files_size never are never cleared fix: metrics stored_index_files_size is never cleared Sep 10, 2024
Signed-off-by: jaime <yun.zhang@zilliz.com>
@jaime0815 jaime0815 force-pushed the reset-segment-index-size-metrics-24 branch from d05c9c0 to 62fb4c3 Compare September 10, 2024 14:03
@mergify mergify bot added the ci-passed label Sep 10, 2024
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.15%. Comparing base (1cd8d1b) to head (62fb4c3).
Report is 10 commits behind head on 2.4.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##              2.4   #36161   +/-   ##
=======================================
  Coverage   81.15%   81.15%           
=======================================
  Files        1059     1059           
  Lines      139498   139499    +1     
=======================================
+ Hits       113214   113215    +1     
+ Misses      22007    22005    -2     
- Partials     4277     4279    +2     
Files with missing lines Coverage Δ
internal/datacoord/meta.go 89.90% <100.00%> (+<0.01%) ⬆️
internal/datacoord/metrics_info.go 94.11% <100.00%> (ø)

... and 34 files with indirect coverage changes

@czs007
Copy link
Collaborator

czs007 commented Sep 13, 2024

/approve
/lgtm

// GetCollectionIndexFilesSize returns the total index files size of all segment for each collection.
func (m *meta) GetCollectionIndexFilesSize() uint64 {
// SetStoredIndexFileSizeMetric returns the total index files size of all segment for each collection.
func (m *meta) SetStoredIndexFileSizeMetric() uint64 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to rename as SetXXX? since it returns a value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The primary function is to set values to metrics, so rename it from a 'get' to a 'set' method. The return value is intended solely for testing.

@czs007
Copy link
Collaborator

czs007 commented Sep 13, 2024

/approve
/lgtm

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: czs007, jaime0815

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sre-ci-robot sre-ci-robot merged commit faf5be2 into milvus-io:2.4 Sep 13, 2024
15 checks passed
@yanliang567 yanliang567 added this to the 2.4.12 milestone Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed dco-passed DCO check passed. kind/bug Issues or changes related a bug lgtm size/S Denotes a PR that changes 10-29 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants