Skip to content

Conversation

@lexluo09
Copy link
Contributor

@lexluo09 lexluo09 commented Mar 24, 2023

Proposed changes

Issue Number: #17947

Currently, if user modify the file on hdfs directly, no through hive. The changes of file will not be noticed by Doris and user
will get wrong data. Support the TTL(Time-to-Live) config of File Cache, so that the stale file info will be invalidated automatically after expiring.

Problem summary

1.Add a parameter configuration to set file cache ttl. "file.meta.cache.ttl-second".
2.Set the value corresponding to guava expireAfterAccess to the configuration value.

Checklist(Required)

  • Does it affect the original behavior
  • Has unit tests been added
  • Has document been added or modified
  • Does it need to update dependencies
  • Is this PR support rollback (If NO, please explain WHY)

Further comments

@github-actions github-actions bot added the kind/docs Categorizes issue or PR as related to documentation. label Mar 24, 2023
@lexluo09 lexluo09 changed the title [Enhancement](multi catalog) Support hive meta cache TTL #17947 [Enhancement](multi catalog) Support hive meta cache TTL Mar 24, 2023
@lexluo09 lexluo09 force-pushed the hive_meta_cache_ttl branch from f8decb3 to 50b7866 Compare March 24, 2023 15:48
@lexluo09 lexluo09 force-pushed the hive_meta_cache_ttl branch from 50b7866 to 76a5453 Compare March 24, 2023 16:29
@lexluo09
Copy link
Contributor Author

run buildall

@lexluo09 lexluo09 force-pushed the hive_meta_cache_ttl branch 3 times, most recently from 602e0ae to 29f7b92 Compare March 25, 2023 12:17
@lexluo09
Copy link
Contributor Author

run buildall

1 similar comment
@lexluo09
Copy link
Contributor Author

run buildall

Copy link
Contributor

@dutyu dutyu left a comment

Choose a reason for hiding this comment

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

LGTM

@lexluo09 lexluo09 force-pushed the hive_meta_cache_ttl branch 2 times, most recently from 4b3adfd to b76ecc9 Compare March 26, 2023 11:46
@PasunuriSrinidhi
Copy link

To implement this solution, the system would set the value corresponding to Guava's expireAfterAccess to the configuration value. Guava is a widely used open-source library for Java, which provides various utilities including caching mechanisms. The expireAfterAccess configuration in Guava's cache mechanism specifies the duration after which a cache entry will be automatically removed from the cache if it has not been accessed during that time.

@lexluo09 lexluo09 force-pushed the hive_meta_cache_ttl branch from b76ecc9 to 3b9a6b0 Compare March 26, 2023 14:49
morningman
morningman previously approved these changes Mar 26, 2023
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman
Copy link
Contributor

run buildall

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 26, 2023
@github-actions
Copy link
Contributor

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

1 similar comment
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@lexluo09
Copy link
Contributor Author

run buildall

1 similar comment
@lexluo09
Copy link
Contributor Author

run buildall

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Mar 27, 2023
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman
Copy link
Contributor

run buildall

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 27, 2023
@github-actions
Copy link
Contributor

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

@morningman morningman merged commit 785e3e3 into apache:master Mar 27, 2023
gnehil pushed a commit to gnehil/doris that referenced this pull request Apr 21, 2023
Currently, if user modify the file on hdfs directly, no through hive. The changes of file will not be noticed by Doris and user
will get wrong data. Support the TTL(Time-to-Live) config of File Cache, so that the stale file info will be invalidated automatically after expiring.

1.Add a parameter configuration to set file cache ttl. "file.meta.cache.ttl-second".
2.Set the value corresponding to guava expireAfterAccess to the configuration value.

Co-authored-by: lexluo <lexluo@tencent.com>
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. kind/docs Categorizes issue or PR as related to documentation. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants