github-actions[bot] commented on code in PR #66599:
URL: https://github.com/apache/doris/pull/66599#discussion_r3746668111


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalDatabase.java:
##########
@@ -792,6 +792,9 @@ public CatalogIf getCatalog() {
     public boolean registerTable(TableIf tableIf) {
         makeSureInitialized();
         T table = (T) tableIf;
+        // Replayed metadata may lose these non-persistent owner references, 
so restore them before publication.

Review Comment:
   The reported failure is a follower/checkpoint lifecycle, but this method is 
event-only: its sole production external caller builds a fresh table with 
`catalog`, `db`, `dbName`, and `nameMapping` already set before calling here. 
Current images also exclude the external database/table caches and rebuild them 
lazily (the existing image-restore test verifies that), so these setters never 
repair a checkpoint-restored table. The new test manually clears two fields on 
a constructor-built object and therefore preserves other non-persistent state 
such as `nameMapping`; if a deserialized table really reached this method, 
schema lookup would still have an incomplete invariant. Please either restore 
the complete invariant at an actual recovery/cache-load boundary, or 
remove/reframe this event-path repair, and add a checkpoint/follower query test 
that proves the reported lifecycle end to end.



-- 
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