atlasdb
atlasdb copied to clipboard
Targeted Sweep can get into an infinite retry loop if a table is only partially dropped
Internal reference 137731
Let T be a table that is written to on a deployment where targeted sweep is enabled. Now, suppose T is dropped. Dropping a table in most implementations non-atomically drops the table from the underlying KVS and then deletes the relevant cell in the metadata table. So suppose the table T is deleted, but its metadata cell remains (because the service went down, or something like that). When processing the targeted sweep queue, attempting to delete from that table will usually result in some kind of exception as the table doesn't exist - but the table does exist as far as targeted sweep is concerned (see SweepQueueDeleter.java:77). We thus have an infinite retry loop.