-
Notifications
You must be signed in to change notification settings - Fork 472
Description
Describe the bug
There may be a race condition where a namesapce could be deleted that has tables. The check for tables in a namespaces was only observed in code on the client side. After this client code does the check it starts a fate operation to delete the namespace. After the client side check is done, not seeing any other checks in the code. If there are no other checks then a table could be created in the namespace after that client side check is done. This would result in a table w/o a namespace.
Expected behavior
A good way to handle this would be to do check for tables after exclusively acquiring the namespace lock in the fate operation to delete the namespace. If tables are found then an exception should be propagated back to the client. The client side check should be removed in order to make testing the server side code possible.
The correctness of this solution requires that all fate table operations get a read lock on the namespace, which is currently done.