Skip to content

Race condition between table creation and namespace deletion #5389

@keith-turner

Description

@keith-turner

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.

Metadata

Metadata

Assignees

Labels

bugThis issue has been verified to be a bug.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions