Skip to content

Conversation

@freemandealer
Copy link
Contributor

@freemandealer freemandealer commented Nov 4, 2024

Previously, cache blocks could be downloaded as different types than the target type we intended to read, leading to false cache misses. E.g., a block might be downloaded as an 'idx' type when the current context expected a 'ttl' type.

The root cause of this problem is the original design encoding meta info such as type and expiration time into cache block file path and readers of this cache block file have inconsistent view of the type so they use different name to locate file and run into error in the end.

This commit tries other type if the initial type failed to locate the file (return NOT_FOUND). Be ware that this is a nasty quick fix. We will elimite the metadate encoded in the file path in the near future to get rid of all the path related problems.

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Check List (For Committer)

  • 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 colde files have been changed.
      • Other reason
  • Behavior changed:

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

    • No.
    • Yes.
  • Release note

    None

Check List (For Reviewer who merge this PR)

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

Previously, cache blocks could be downloaded as different types than the
target type we intended to read, leading to false cache misses. E.g., a
block might be downloaded as an 'idx' type when the current context
expected a 'ttl' type.

The root cause of this problem is the original design encoding meta info
such as type and expiration time into cache block file path and readers
of this cache block file have inconsistent view of the type so they use
different name to locate file and run into error in the end.

This commit tries other type if the initial type failed to locate
the file (return NOT_FOUND). Be ware that this is a nasty quick fix. We
will elimite the metadate encoded in the file path in the near future to
get rid of all the path related problems.

Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
@doris-robot
Copy link

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

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@freemandealer
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2024

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.81% (9821/25976)
Line Coverage: 28.99% (81691/281832)
Region Coverage: 28.22% (42099/149202)
Branch Coverage: 24.80% (21366/86148)
Coverage Report: http://coverage.selectdb-in.cc/coverage/b4f77be7f1a0b2b19b5e72892911996ab29b97e0_b4f77be7f1a0b2b19b5e72892911996ab29b97e0/report/index.html

Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
@freemandealer
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2024

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2024

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.89% (9852/26001)
Line Coverage: 29.04% (81894/282039)
Region Coverage: 28.27% (42195/149240)
Branch Coverage: 24.85% (21407/86140)
Coverage Report: http://coverage.selectdb-in.cc/coverage/e986fd1d29bf7372fdbfe8649e09a5cda863ebd2_e986fd1d29bf7372fdbfe8649e09a5cda863ebd2/report/index.html

@freemandealer
Copy link
Contributor Author

run external

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 7, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2024

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2024

PR approved by anyone and no changes requested.

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring dataroaring merged commit f0ee17b into apache:master Nov 8, 2024
github-actions bot pushed a commit that referenced this pull request Nov 8, 2024
Previously, cache blocks could be downloaded as different types than the
target type we intended to read, leading to false cache misses. E.g., a
block might be downloaded as an 'idx' type when the current context
expected a 'ttl' type.

The root cause of this problem is the original design encoding meta info
such as type and expiration time into cache block file path and readers
of this cache block file have inconsistent view of the type so they use
different name to locate file and run into error in the end.

This commit tries other type if the initial type failed to locate the
file (return NOT_FOUND). Be ware that this is a nasty quick fix. We will
elimite the metadate encoded in the file path in the near future to get
rid of all the path related problems.
freemandealer added a commit to freemandealer/doris that referenced this pull request Nov 8, 2024
…43220)

Previously, cache blocks could be downloaded as different types than the
target type we intended to read, leading to false cache misses. E.g., a
block might be downloaded as an 'idx' type when the current context
expected a 'ttl' type.

The root cause of this problem is the original design encoding meta info
such as type and expiration time into cache block file path and readers
of this cache block file have inconsistent view of the type so they use
different name to locate file and run into error in the end.

This commit tries other type if the initial type failed to locate the
file (return NOT_FOUND). Be ware that this is a nasty quick fix. We will
elimite the metadate encoded in the file path in the near future to get
rid of all the path related problems.
freemandealer added a commit to freemandealer/doris that referenced this pull request Nov 8, 2024
…43220)

Previously, cache blocks could be downloaded as different types than the
target type we intended to read, leading to false cache misses. E.g., a
block might be downloaded as an 'idx' type when the current context
expected a 'ttl' type.

The root cause of this problem is the original design encoding meta info
such as type and expiration time into cache block file path and readers
of this cache block file have inconsistent view of the type so they use
different name to locate file and run into error in the end.

This commit tries other type if the initial type failed to locate the
file (return NOT_FOUND). Be ware that this is a nasty quick fix. We will
elimite the metadate encoded in the file path in the near future to get
rid of all the path related problems.
dataroaring pushed a commit that referenced this pull request Nov 8, 2024
…3220) (#43512)

pick #43220 pick #43220 pick #43220

Previously, cache blocks could be downloaded as different types than the
target type we intended to read, leading to false cache misses. E.g., a
block might be downloaded as an 'idx' type when the current context
expected a 'ttl' type.

The root cause of this problem is the original design encoding meta info
such as type and expiration time into cache block file path and readers
of this cache block file have inconsistent view of the type so they use
different name to locate file and run into error in the end.

This commit tries other type if the initial type failed to locate the
file (return NOT_FOUND). Be ware that this is a nasty quick fix. We will
elimite the metadate encoded in the file path in the near future to get
rid of all the path related problems.
dataroaring pushed a commit that referenced this pull request Nov 10, 2024
…UND (#43504)

Cherry-picked from #43220

Co-authored-by: zhengyu <freeman.zhang1992@gmail.com>
@gavinchou gavinchou added the cir label Nov 11, 2024
eldenmoon pushed a commit to eldenmoon/incubator-doris that referenced this pull request Nov 18, 2024
…43220)

Previously, cache blocks could be downloaded as different types than the
target type we intended to read, leading to false cache misses. E.g., a
block might be downloaded as an 'idx' type when the current context
expected a 'ttl' type.

The root cause of this problem is the original design encoding meta info
such as type and expiration time into cache block file path and readers
of this cache block file have inconsistent view of the type so they use
different name to locate file and run into error in the end.

This commit tries other type if the initial type failed to locate the
file (return NOT_FOUND). Be ware that this is a nasty quick fix. We will
elimite the metadate encoded in the file path in the near future to get
rid of all the path related problems.
@gavinchou gavinchou mentioned this pull request Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. cir dev/3.0.3-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants