Skip to content

[chore](cloud) Support dynamic recycler instance filter config#63822

Open
wyxxxcat wants to merge 1 commit into
apache:masterfrom
wyxxxcat:update_white_list_for_recycler
Open

[chore](cloud) Support dynamic recycler instance filter config#63822
wyxxxcat wants to merge 1 commit into
apache:masterfrom
wyxxxcat:update_white_list_for_recycler

Conversation

@wyxxxcat
Copy link
Copy Markdown
Collaborator

@wyxxxcat wyxxxcat commented May 28, 2026

What problem does this PR solve?

Read recycler whitelist and blacklist directly from config when scanning instances, so runtime config updates can affect filtering without restart.
Add a unit test for dynamic filter changes.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@wyxxxcat
Copy link
Copy Markdown
Collaborator Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@wyxxxcat
Copy link
Copy Markdown
Collaborator Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

The PR is small and focused, but it does not currently achieve its stated goal of allowing runtime config updates to affect recycler instance filtering.

Critical checkpoint conclusions:

  • Goal/test: The goal is to make recycler whitelist/blacklist changes effective without restart. The new unit test validates direct assignment to config globals, but production updates go through config::set_config/update_config, where these fields are still immutable CONF_Strings and vector updates are unsupported. The goal is therefore not proven or implemented end-to-end.
  • Scope: The code change is small, but it removes the cached filter before the config plumbing supports safe dynamic vector updates.
  • Concurrency/lifecycle: The changed recycler scan path is threaded. If these vectors are made truly mutable later, direct unsynchronized iteration over std::vector would also need a safe update/read mechanism or snapshot.
  • Config items: Existing config items are central to this PR. They are not mutable, and the runtime setter does not handle std::vectorstd::string, so dynamic changes cannot be applied through the supported path.
  • Compatibility/storage/transactions: No incompatible storage, transaction, or persistence format changes found. Recycler two-phase delete/idempotent paths are not otherwise changed.
  • Parallel paths: Checker still uses a cached WhiteBlackList. This is not necessarily blocking for the recycler-only goal, but it should be considered if the same config is expected to scope checker behavior dynamically.
  • Tests: A unit test was added, but it bypasses the actual runtime config update API and therefore misses the regression this PR is meant to fix. No additional user-provided review focus was supplied.
  • Observability/performance: No new observability requirement identified for this small filtering change. Vector scans preserve prior semantics but do not provide the same cached-set lookup characteristics; likely acceptable for small lists.

Please update the runtime config path (and any needed synchronization/snapshotting) so whitelist/blacklist updates can actually be applied without restart, then adjust the test to exercise that supported path.

Comment thread cloud/src/recycler/recycler.cpp
@wyxxxcat
Copy link
Copy Markdown
Collaborator Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 100.00% (27/27) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.08% (1856/2377)
Line Coverage 64.56% (33373/51691)
Region Coverage 65.27% (16560/25373)
Branch Coverage 55.79% (8858/15878)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants