Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](hive) sync DDL command to other FE #46326

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

morningman
Copy link
Contributor

@morningman morningman commented Jan 2, 2025

What problem does this PR solve?

When executing DDL on a hive table, the DDL command should be synced to other FE,
so that other FE can invalidate the cache of that table or db.
Otherwise, after executing the DDL on a hive table on non-master FE and then query that table,
we can still access to the cached files.

Modify the following ddl:

  1. create db/table
  2. drop db/table
  3. truncate table

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

@Thearas
Copy link
Contributor

Thearas commented Jan 2, 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?

@morningman morningman changed the title [fix](hive) sync trucate table command to other FE [fix](hive) sync DDL command to other FE Jan 2, 2025
@morningman
Copy link
Contributor Author

This pull request includes significant changes to enhance the handling of database and table operations in the Env and ExternalCatalog classes. The most important changes include adding new methods to replay database and table operations, updating existing methods to use these new methods, and improving logging for these operations.

Enhancements to database and table operations:

These changes improve the modularity and maintainability of the code, making it easier to manage and extend the functionality for database and table operations.

@morningman morningman marked this pull request as draft January 3, 2025 02:33
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