pingcap / tidb

TiDB - the open-source, cloud-native, distributed SQL database designed for modern applications.
https://pingcap.com
Apache License 2.0
37.26k stars 5.85k forks source link

misc information is not reset when full load info schema #55132

Closed wjhuang2016 closed 3 months ago

wjhuang2016 commented 3 months ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

func (isd *Data) resetBeforeFullLoad(schemaVersion int64) {
    resetTableInfoResidentBeforeFullLoad(isd.tableInfoResident, schemaVersion)

    resetByIDBeforeFullLoad(isd.byID, schemaVersion)
    resetByNameBeforeFullLoad(isd.byName, schemaVersion)

    resetSchemaMapBeforeFullLoad(isd.schemaMap, schemaVersion)
    resetSchemaID2NameBeforeFullLoad(isd.schemaID2Name, schemaVersion)

    resetPID2TIDBeforeFullLoad(isd.pid2tid, schemaVersion)
}

resetBeforeFullLoad already handles some V2-related data, but the common data in misc is not handled.

2. What did you expect to see? (Required)

N/A

3. What did you see instead (Required)

N/A

4. What is your TiDB version? (Required)

master

tiancaiamao commented 3 months ago

close by https://github.com/pingcap/tidb/pull/55229