[docdb] WAL replay of deleted table from colocated tablet can lead to crashes #6096
Closed
Description
Noticed a crash recently that seems to point back to this situation. We should probably have a test for this to validate it indeed can cause this:
- colocated tablet with a table foo
ALTER TABLE foo
-- this requires the table id forfoo
to be in the TS raft metadataDROP TABLE foo
-- this will remove the table id forfoo
from the TS raft metadata- restart a TS -- on startup, we do a local bootstrap of the rocksdb data + raft data
- if the last rocksdb flush happened before the ALTER, then we need to replay WAL files which would include the ALTER operation, but for a table id that is no longer present in the raft metadata, leading to a crash!