alpass163 opened a new pull request, #18762:
URL: https://github.com/apache/iotdb/pull/18762
Reverts commit 3b47945b3ceb0c3c25c1951a7afd3b2424fde3d5 (PR #18626).
Why
The DataNode cache problem that #18626 targets does not exist. It assumes a
DataNode table fetch can observe a table whose procedure is still
uncommitted,
so that a later rollback would need a saved snapshot of the replaced
schema to
restore. A fetch cannot return such a table: ConfigManager.fetchTables
(ConfigManager.java:3400) removes from the request every table that
ProcedureManager.checkDuplicateTableTask (ProcedureManager.java:2506)
reports
as busy, that is, every table with an unfinished procedure
(ConfigManager.java:3410-3414).
So while a procedure is still in progress the DataNode never sees the
pending
schema, and when the procedure does reach rollback the cache still holds
the
pre-update state, which the existing rollbackUpdateTable
(DataNodeTableCache.java:235) already restores correctly. Conversely, if a
fetch does return the table, the procedure has already finished, so no
rollback RPC follows for that update.
previousTableMap therefore guards a case that cannot occur, and in exchange
adds a second cache state map that has to be kept consistent with
specialStatusMap on every pre-update, commit, rollback and database drop.
--
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]