Skip to content

Conversation

@zy-kkk
Copy link
Member

@zy-kkk zy-kkk commented Nov 4, 2025

Problem Summary:

catalogs are incorrectly removed from the auto-refresh queue when:

  • Creating a new catalog with metadata_refresh_interval_sec
  • Altering catalog properties via ALTER CATALOG SET PROPERTIES

This causes auto-refresh to stop working even though metadata_refresh_interval_sec is configured.

Root Cause:
CREATE/ALTER CATALOG
→ resetToUninitialized()
→ onClose()
→ CatalogIf.super.onClose()
→ removeFromRefreshMap(catalogId) ❌ Wrong!

Fix:

  1. Remove CatalogIf.super.onClose() call from ExternalCatalog.onClose()
  • Prevents wrongly removing catalog from refresh queue during CREATE/ALTER
  1. Explicitly call removeFromRefreshMap() in CatalogMgr.removeCatalog()
  • Ensures catalog is properly removed when actually dropping it

Related: #57680

@zy-kkk zy-kkk requested a review from morrySnow as a code owner November 4, 2025 04:00
@Thearas
Copy link
Contributor

Thearas commented Nov 4, 2025

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?

@zy-kkk zy-kkk changed the title [fix](catalog) Prevent removing catalog from refresh queue on CREATE/ALTER branch-3.1: [fix](catalog) Prevent removing catalog from refresh queue on CREATE/ALTER Nov 4, 2025
@zy-kkk
Copy link
Member Author

zy-kkk commented Nov 4, 2025

run buildall

@zy-kkk
Copy link
Member Author

zy-kkk commented Nov 4, 2025

run buildall

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉
Increment coverage report
Complete coverage report

@zy-kkk
Copy link
Member Author

zy-kkk commented Nov 4, 2025

run buildall

@zy-kkk
Copy link
Member Author

zy-kkk commented Nov 5, 2025

run buildall

@zy-kkk zy-kkk merged commit fc76577 into apache:branch-3.1 Nov 5, 2025
22 checks passed
@zy-kkk zy-kkk deleted the fix_refresh_auto branch November 5, 2025 09:54
Hastyshell pushed a commit to Hastyshell/doris that referenced this pull request Nov 12, 2025
@morrySnow morrySnow mentioned this pull request Nov 13, 2025
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.

5 participants