Skip to content

Conversation

@congqixia
Copy link
Contributor

Cherry-pick from master
pr: #45943
Add collection-level granularity to the garbage collector pause/resume mechanism. Previously, GC pause affected all collections globally. Now operators can pause GC for specific collections while allowing other collections to continue normal GC operations.

Changes:

  • Add pausedCollection concurrent map to track per-collection pause state
  • Extend Pause() and Resume() methods with collectionID parameter
  • Add collectionGCPaused() helper to check collection pause status
  • Skip dropped segment recycling when collection GC is paused
  • Update management API to accept optional collection_id query parameter
  • Add GetInt64Value() utility function for parsing int64 from KV pairs
  • Maintain backward compatibility: collectionID <= 0 triggers global pause

This provides DevOps with finer control over Milvus data lifecycle.

issue: #45941


Add collection-level granularity to the garbage collector pause/resume
mechanism. Previously, GC pause affected all collections globally. Now
operators can pause GC for specific collections while allowing other
collections to continue normal GC operations.

Changes:
- Add `pausedCollection` concurrent map to track per-collection pause
state
- Extend `Pause()` and `Resume()` methods with `collectionID` parameter
- Add `collectionGCPaused()` helper to check collection pause status
- Skip dropped segment recycling when collection GC is paused
- Update management API to accept optional `collection_id` query
parameter
- Add `GetInt64Value()` utility function for parsing int64 from KV pairs
- Maintain backward compatibility: collectionID <= 0 triggers global
pause

This provides DevOps with finer control over Milvus data lifecycle.

issue: milvus-io#45941

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
@congqixia congqixia added this to the 2.6.8 milestone Dec 8, 2025
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: congqixia

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 added approved size/XL Denotes a PR that changes 500-999 lines. labels Dec 8, 2025
@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels Dec 8, 2025
@sre-ci-robot
Copy link
Contributor

[ci-v2-notice]
Notice: We are gradually rolling out the new ci-v2 system.

  • Legacy CI jobs remain unaffected, you can just ignore ci-v2 if you don't want to run it.
  • Additional "ci-v2/*" checkers will run for this PR to ensure the new ci-v2 system is working as expected.
  • For tests that exist in both v1 and v2, passing in either system is considered PASS.

To rerun ci-v2 checks, comment with:

  • /ci-rerun-code-check // for ci-v2/code-check
  • /ci-rerun-build // for ci-v2/build
  • /ci-rerun-ut-integration // for ci-v2/ut-integration
  • /ci-rerun-ut-go // for ci-v2/ut-go
  • /ci-rerun-ut-cpp // for ci-v2/ut-cpp
  • /ci-rerun-ut // for all ci-v2/ut-integration, ci-v2/ut-go, ci-v2/ut-cpp
  • /ci-rerun-e2e-arm // for ci-v2/e2e-arm [master branch only]
  • /ci-rerun-e2e-default // for ci-v2/e2e-default [master branch only]

If you have any questions or requests, please contact @zhikunyao.

@sre-ci-robot
Copy link
Contributor

[INFO] PR Label Summary by Default
[SUCCESS] PR #45943 merged to master

Use /refresh-label to update related check and label manually

@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

❌ Patch coverage is 67.10963% with 99 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.06%. Comparing base (cb08db0) to head (70a1950).
⚠️ Report is 362 commits behind head on 2.6.

Files with missing lines Patch % Lines
internal/datacoord/garbage_collector.go 67.45% 60 Missing and 9 partials ⚠️
internal/proxy/management.go 67.85% 17 Missing and 1 partial ⚠️
internal/datacoord/services.go 53.84% 4 Missing and 2 partials ⚠️
pkg/common/common.go 70.00% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              2.6   #46201      +/-   ##
==========================================
- Coverage   76.99%   76.06%   -0.93%     
==========================================
  Files        1700     1876     +176     
  Lines      262533   291961   +29428     
==========================================
+ Hits       202142   222092   +19950     
- Misses      53550    62473    +8923     
- Partials     6841     7396     +555     
Components Coverage Δ
Client 78.03% <65.76%> (-0.11%) ⬇️
Core 82.73% <72.75%> (+0.52%) ⬆️
Go 74.19% <51.56%> (-1.20%) ⬇️
Files with missing lines Coverage Δ
internal/datacoord/services.go 85.21% <53.84%> (+3.84%) ⬆️
pkg/common/common.go 71.54% <70.00%> (+5.59%) ⬆️
internal/proxy/management.go 85.26% <67.85%> (-2.50%) ⬇️
internal/datacoord/garbage_collector.go 64.31% <67.45%> (-0.34%) ⬇️

... and 777 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement size/XL Denotes a PR that changes 500-999 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants