morningman commented on PR #46326:
URL: https://github.com/apache/doris/pull/46326#issuecomment-2568011630

   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:
   
   * 
[`fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java`](diffhunk://#diff-bbd4eef320c67a1b2702d6cabf12b794dd8efb6b1bc61e9b70ebc639f4a0ece0R3262-R3272):
 Added new methods `replayNewCreateDb`, `replayDropDb`, `replayCreateTable`, 
and `replayTruncateTable` to handle replaying of database and table operations. 
Updated existing methods to use these new methods for better modularity and 
clarity. 
[[1]](diffhunk://#diff-bbd4eef320c67a1b2702d6cabf12b794dd8efb6b1bc61e9b70ebc639f4a0ece0R3262-R3272)
 
[[2]](diffhunk://#diff-bbd4eef320c67a1b2702d6cabf12b794dd8efb6b1bc61e9b70ebc639f4a0ece0L3269-R3291)
 
[[3]](diffhunk://#diff-bbd4eef320c67a1b2702d6cabf12b794dd8efb6b1bc61e9b70ebc639f4a0ece0L4149-R4178)
 
[[4]](diffhunk://#diff-bbd4eef320c67a1b2702d6cabf12b794dd8efb6b1bc61e9b70ebc639f4a0ece0R5882-R5891)
   
   * 
[`fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalCatalog.java`](diffhunk://#diff-50477c5ff1b42452704e942fe5fc738563dc64182690f378925fbc2401be5d48R934-R947):
 Added methods `replayCreateDb`, `replayDropDb`, `replayCreateTable`, 
`replayDropTable`, and `replayTruncateTable` to support replaying operations. 
Enhanced logging in methods `createDb`, `dropDb`, `createTable`, and 
`truncateTable` to provide more detailed information. 
[[1]](diffhunk://#diff-50477c5ff1b42452704e942fe5fc738563dc64182690f378925fbc2401be5d48R934-R947)
 
[[2]](diffhunk://#diff-50477c5ff1b42452704e942fe5fc738563dc64182690f378925fbc2401be5d48R957-R970)
 
[[3]](diffhunk://#diff-50477c5ff1b42452704e942fe5fc738563dc64182690f378925fbc2401be5d48L958-R997)
 
[[4]](diffhunk://#diff-50477c5ff1b42452704e942fe5fc738563dc64182690f378925fbc2401be5d48R1007-R1020)
 
[[5]](diffhunk://#diff-50477c5ff1b42452704e942fe5fc738563dc64182690f378925fbc2401be5d48L1079-R1136)
   
   * 
[`fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetadataOps.java`](diffhunk://#diff-c75ea6d8265f80493833782fd0736d8189d5bec2a91773ce9a7164dc97e88ca1L109-R110):
 Introduced methods `createDbImpl`, `dropDbImpl`, `createTableImpl`, 
`dropTableImpl`, `afterCreateDb`, `afterDropDb`, `afterCreateTable`, 
`afterDropTable`, and `afterTruncateTable` to separate the implementation and 
post-processing of operations. Updated existing methods to call these new 
methods. 
[[1]](diffhunk://#diff-c75ea6d8265f80493833782fd0736d8189d5bec2a91773ce9a7164dc97e88ca1L109-R110)
 
[[2]](diffhunk://#diff-c75ea6d8265f80493833782fd0736d8189d5bec2a91773ce9a7164dc97e88ca1L132-R145)
 
[[3]](diffhunk://#diff-c75ea6d8265f80493833782fd0736d8189d5bec2a91773ce9a7164dc97e88ca1L152-R168)
 
[[4]](diffhunk://#diff-c75ea6d8265f80493833782fd0736d8189d5bec2a91773ce9a7164dc97e88ca1L278-R309)
 
[[5]](diffhunk://#diff-c75ea6d8265f80493833782fd0736d8189d5bec2a91773ce9a7164dc97e88ca1R319-R332)
   
   * 
[`fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergMetadataOps.java`](diffhunk://#diff-7cf5a22dfe9d3e82d07a651021cae7a8764b47b2fbfcbbf21737888adaf0c84eL119-R135):
 Similar to `HiveMetadataOps`, added methods `createDbImpl`, `dropDbImpl`, 
`createTableImpl`, `dropTableImpl`, `afterCreateDb`, `afterDropDb`, and 
`afterCreateTable` to handle the implementation and post-processing of database 
and table operations. 
[[1]](diffhunk://#diff-7cf5a22dfe9d3e82d07a651021cae7a8764b47b2fbfcbbf21737888adaf0c84eL119-R135)
 
[[2]](diffhunk://#diff-7cf5a22dfe9d3e82d07a651021cae7a8764b47b2fbfcbbf21737888adaf0c84eL152-R159)
 
[[3]](diffhunk://#diff-7cf5a22dfe9d3e82d07a651021cae7a8764b47b2fbfcbbf21737888adaf0c84eR182-R190)
 
[[4]](diffhunk://#diff-7cf5a22dfe9d3e82d07a651021cae7a8764b47b2fbfcbbf21737888adaf0c84eL220-R239)
   
   These changes improve the modularity and maintainability of the code, making 
it easier to manage and extend the functionality for database and table 
operations.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to