Skip to content

[fix](be) Fix file cache queue evict size metrics (#64897) - #66069

Merged
morningman merged 1 commit into
apache:branch-4.0from
deardeng:codex/pick-64897-to-branch-4.0
Jul 27, 2026
Merged

[fix](be) Fix file cache queue evict size metrics (#64897)#66069
morningman merged 1 commit into
apache:branch-4.0from
deardeng:codex/pick-64897-to-branch-4.0

Conversation

@deardeng

Copy link
Copy Markdown
Contributor

pick from #64897
Problem Summary: File cache queue evict size metrics were constructed with literal array indexes, while increments use FileCacheType enum values. Because FileCacheType maps DISPOSABLE to 0 and INDEX to 2, file_cache_index_queue_evict_size actually counted disposable queue evictions, and file_cache_disposable_queue_evict_size counted index queue evictions. This change initializes the metrics array with explicit FileCacheType indexes so each bvar name matches the queue type that increments it.

(cherry picked from commit 7f0ab56)

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

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

Problem Summary: File cache queue evict size metrics were constructed
with literal array indexes, while increments use FileCacheType enum
values. Because FileCacheType maps DISPOSABLE to 0 and INDEX to 2,
file_cache_index_queue_evict_size actually counted disposable queue
evictions, and file_cache_disposable_queue_evict_size counted index
queue evictions. This change initializes the metrics array with explicit
FileCacheType indexes so each bvar name matches the queue type that
increments it.

(cherry picked from commit 7f0ab56)
@deardeng
deardeng requested a review from morningman as a code owner July 26, 2026 14:27
@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?

@deardeng

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (7/7) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.58% (19594/36568)
Line Coverage 36.64% (183408/500559)
Region Coverage 33.20% (142611/429512)
Branch Coverage 34.06% (61665/181026)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (7/7) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.48% (25571/35775)
Line Coverage 54.38% (271286/498905)
Region Coverage 51.97% (224995/432940)
Branch Coverage 53.35% (96800/181448)

@morningman
morningman merged commit 6ffd9b1 into apache:branch-4.0 Jul 27, 2026
28 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants