Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
In many qtests we are creating external tables by setting explicitly the location of the table.
If the test does not remove explicitly the directory (as it happens above) then it remains there and may cause flakiness and unrelated test failures if other tests happen to use the same directory somehow.
A recent case where this problem appeared (directory conflict between tests) is logged under HIVE-26584. There the solution was to add explicit rm commands in the qfiles.
A more general solution would be to handle the cleanup of such directories inside QTestUtil.clearTablesCreatedDuringTests.
The idea is to get the location for an external table from the metastore and remove the respective directory if it is under a known "safe" directory such as ${system:test.tmp.dir}.
As discussed under HIVE-26584 it might be risky to forcefully delete any kind of directory coming from an external table at the risk of corrupting the development environment. If we restrict the cleanup to known directories it should be fine though.
Attachments
Issue Links
- relates to
-
HIVE-26584 compressed_skip_header_footer_aggr.q is flaky
- Closed