-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Backup: address scenario where file Close() hangs indefinitely #13677
Description
Backup/restore supports a variety of backup file read/write implementations. It can read/write local files, or it can read/write from some cloud, or it can use an external command.
We have seen scenarios where trying to Close() a file, hangs. This was first addressed as early as #5193. Closing the file is at the very end of the backup/restore process. However, it is nonetheless a critical part of the flow. If a file cannot be Close()d, we cannot vouch for the backup.
Ideally, the backup process shouldn't hang forever. There needs to be some timeout Close()ing the file. And timing out should fail the backup operation. But another thing to consider is that the Close() operation may still hang for hours. Depending on the implementation, this might hold resources or file locks.