Caideyipi opened a new pull request, #18407:
URL: https://github.com/apache/iotdb/pull/18407
## Description
### Problem
When a table-model database deletion procedure is still running after the
database schema has already been removed, `getAllExecutingTables` reports the
database with a null table list while `getAllUsingTables` no longer contains
that database.
`getAllTableInfoForDataNodeActivation` previously called `forEach` on the
missing table list. This caused a ConfigNode `NullPointerException` and
repeatedly rejected DataNode restart requests and metadata lease cache recovery.
### Fix
Skip the non-committable table conversion when the deleting database is
already absent from the using-table map. There are no remaining using tables to
mark in that state, and the special database status is still serialized.
### Test
Added a unit test that reproduces the state where a database deletion is
executing but the database has already been removed from the using-table map.
Tested with:
mvn test -pl iotdb-core/confignode -Dtest=ClusterSchemaManagerTest
This PR has:
- [x] been self-reviewed.
- [x] concurrent read and write
- [x] added comments explaining the why and intent of the code.
- [x] added unit tests to cover the new code path.
##### Key changed/added classes
- `ClusterSchemaManager`
- `ClusterSchemaManagerTest`
--
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]