chenboat commented on issue #4608: Unit tests and bug fixes for DeleteTable rest API for controller. URL: https://github.com/apache/incubator-pinot/pull/4608#issuecomment-535756738 > > > The reason why we do not check if table exists is because when the previous table delete failed in the middle, the ideal state might already be removed. We still want to clean up the other properties for the table. > > > > > > Thanks for pointing this out. Is it a common case? We could solve this issue in a periodically validation cleaner task? > > That is not the common case, but in exception path. Yes, that can be achieved by a periodically validation, but automatically delete table properties could also be risky. Right now we still rely on manually call the delete table again to clean up all properties. > Any reason why you want to check the table existence first? The reason is to existence check is to make sure the returned message does not show successful deletion of an non-existent table. This is also consistent with the other similar API DropTable() which does a table existence check. The main purpose of this PR is to add unit test coverage. I did not know you also rely on this API to clear up some remaining metadata -- it is a minor but important use case i guess. I propose we at least modify the return message for the case of non-existent table: something along the line like "WARNING: table name does not exist. Delete table successfully".
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
