Incorrect behavior when a recursively deleted directory is out of sync with UFS

Description

To reproduce, create folders "/dir" and "/dir/child" in Alluxio, then create "/dir/ufsOnly" in the UFS without going through Alluxio. Now try deleting "/dir" recursively.

Expected:
/dir/child is deleted since it is in sync with the UFS
/dir is not deleted since it is out of sync with the UFS

Actual:
/dir is deleted

This is due to a bug in the master where whenever it tries to delete a child of an out-of-sync directory, it deletes the out-of-sync directory instead. If the out-of-sync directory has multiple in-sync children, this will also result in a journal issue where two journal entries in a row attempt to delete the same directory. Once this happens, the master can no longer start up.

Environment

None

Status

Assignee

Andrew Audibert

Reporter

Andrew Audibert

Labels

Components

Affects versions

1.5.0

Priority

Critical
Configure