Brendan Ashworth
aeafe668d8
posix: do not upstream errors in deleteFile ( #4771 )
...
This commit changes posix's deleteFile() to not upstream errors from
removing parent directories. This fixes a race condition.
The race condition occurs when multiple deleteFile()s are called on the
same parent directory, but different child files. Because deleteFile()
recursively removes parent directories if they are empty, but
deleteFile() errors if the selected deletePath does not exist, there was
an opportunity for a race condition. The two processes would remove the
child directories successfully, then depend on the parent directory
still existing. In some cases this is an invalid assumption, because
other processes can remove the parent directory beforehand. This commit
changes deleteFile() to not upstream an error if one occurs, because the
only required error should be from the immediate deletePath, not from a
parent path.
In the specific bug report, multiple CompleteMultipartUpload requests
would launch multiple deleteFile() requests. Because they chain up on
parent directories, ultimately at the end, there would be multiple
remove files for the ultimate parent directory,
.minio.sys/multipart/{bucket}. Because only one will succeed and one
will fail, an error would be upstreamed saying that the file does not
exist, and the CompleteMultipartUpload code interpreted this as
NoSuchKey, or that the object/part id doesn't exist. This was faulty
behavior and is now fixed.
The added test fails before this change and passes after this change.
Fixes: https://github.com/minio/minio/issues/4727
2017-08-04 16:51:20 -07:00
..
2017-06-02 14:05:51 -07:00
2017-05-15 07:28:47 -07:00
2017-03-17 09:25:49 -07:00
2017-04-14 08:00:04 -07:00
2017-06-21 19:53:09 -07:00
2017-04-11 15:44:27 -07:00
2017-07-18 09:30:46 -07:00
2017-01-10 16:43:48 -08:00
2017-04-27 11:26:00 -07:00
2017-07-12 16:42:14 -07:00
2017-03-18 11:28:41 -07:00
2017-06-23 16:05:40 -07:00
2016-10-12 11:02:15 -07:00
2016-10-12 11:02:15 -07:00
2016-11-21 13:51:05 -08:00
2017-06-20 15:01:13 -07:00
2017-01-31 09:38:34 -08:00
2017-04-10 09:58:08 -07:00
2017-05-31 00:11:06 -07:00
2017-01-07 11:27:01 -08:00
2017-05-16 14:34:56 -07:00
2017-06-20 15:01:13 -07:00
2017-01-02 20:57:42 +05:30
2017-06-01 09:43:20 -07:00
2017-03-26 12:00:27 -07:00
2017-03-26 12:00:27 -07:00
2017-03-18 11:28:41 -07:00
2017-03-16 00:16:06 -07:00
2017-07-18 09:30:46 -07:00
2017-06-01 09:43:20 -07:00
2017-06-16 22:17:00 -07:00
2017-07-23 19:35:18 -07:00
2017-01-02 20:57:42 +05:30
2017-05-03 20:10:00 -07:00
2017-06-20 15:01:13 -07:00
2017-07-03 19:59:41 -07:00
2017-06-14 17:27:49 -07:00
2017-06-14 17:27:49 -07:00
2017-06-01 09:43:20 -07:00
2017-02-03 23:27:50 -08:00
2017-01-30 09:20:16 -08:00
2017-02-03 23:27:50 -08:00
2017-01-16 17:05:00 -08:00
2017-01-18 12:24:34 -08:00
2017-03-08 19:20:01 -08:00
2017-07-12 16:33:21 -07:00
2017-06-16 16:01:41 -07:00
2017-03-30 11:21:19 -07:00
2017-06-14 17:27:49 -07:00
2017-06-14 17:27:49 -07:00
2017-06-14 17:27:49 -07:00
2017-06-14 17:27:49 -07:00
2017-06-14 17:27:49 -07:00
2017-03-23 16:36:00 -07:00
2017-03-03 16:32:04 -08:00
2017-03-03 16:32:04 -08:00
2017-08-03 20:03:37 -07:00
2017-08-03 20:03:37 -07:00
2017-01-16 17:05:00 -08:00
2017-01-16 17:05:00 -08:00
2017-06-08 18:58:51 -07:00
2017-06-21 19:53:09 -07:00
2016-08-18 16:23:42 -07:00
2017-06-14 17:14:27 -07:00
2017-06-14 17:14:27 -07:00
2017-06-14 17:14:27 -07:00
2017-05-16 14:21:52 -07:00
2017-06-14 17:14:27 -07:00
2017-05-16 14:21:52 -07:00
2016-08-18 16:23:42 -07:00
2017-05-16 14:21:52 -07:00
2017-02-16 14:52:14 -08:00
2017-06-20 15:01:13 -07:00
2017-07-23 19:35:18 -07:00
2017-01-16 17:05:00 -08:00
2017-01-16 17:05:00 -08:00
2016-10-29 12:44:44 -07:00
2017-03-23 16:36:00 -07:00
2017-06-12 17:40:28 -07:00
2017-06-12 17:40:28 -07:00
2017-06-12 17:40:28 -07:00
2017-02-24 09:20:40 -08:00
2017-08-03 20:04:28 -07:00
2017-08-03 20:04:28 -07:00
2017-06-12 17:40:28 -07:00
2017-06-13 08:29:07 -07:00
2017-06-01 09:43:20 -07:00
2017-08-04 14:14:23 -07:00
2017-01-18 12:24:34 -08:00
2017-02-28 18:05:52 -08:00
2017-08-04 10:45:57 -07:00
2017-06-16 14:47:02 -07:00
2017-07-10 18:21:12 -07:00
2017-06-23 22:07:46 -07:00
2017-06-21 19:53:09 -07:00
2017-07-12 16:42:14 -07:00
2017-07-20 15:36:48 -07:00
2017-06-23 17:35:45 -07:00
2017-07-07 14:31:42 -07:00
2017-06-16 14:47:02 -07:00
2017-07-20 15:36:48 -07:00
2017-07-05 16:56:10 -07:00
2017-06-16 16:01:41 -07:00
2017-07-20 16:39:11 -07:00
2017-06-16 22:17:00 -07:00
2017-05-01 10:32:18 -07:00
2017-06-21 19:53:09 -07:00
2017-06-21 19:53:09 -07:00
2017-06-23 12:19:10 -07:00
2017-06-16 16:01:41 -07:00
2017-06-16 16:01:41 -07:00
2017-02-16 14:52:14 -08:00
2017-04-27 12:40:22 -07:00
2017-07-12 16:33:21 -07:00
2017-07-05 16:56:10 -07:00
2017-07-05 16:56:10 -07:00
2016-12-19 19:32:55 -08:00
2017-04-21 07:15:53 -07:00
2016-08-18 16:23:42 -07:00
2016-08-18 16:23:42 -07:00
2017-08-03 20:03:37 -07:00
2017-07-24 12:46:37 -07:00
2017-03-18 11:28:41 -07:00
2017-04-15 11:40:01 -07:00
2017-03-18 11:28:41 -07:00
2017-04-11 10:25:21 -07:00
2017-01-02 20:57:42 +05:30
2017-06-05 12:25:04 -07:00
2017-06-05 12:25:04 -07:00
2017-06-05 12:25:04 -07:00
2017-07-18 09:30:46 -07:00
2016-12-26 10:29:55 -08:00
2017-02-01 11:17:30 -08:00
2017-04-15 11:40:01 -07:00
2017-03-23 16:36:00 -07:00
2017-04-01 01:06:06 -07:00
2016-08-18 16:23:42 -07:00
2017-06-13 00:33:21 +00:00
2016-12-10 16:15:12 -08:00
2017-06-05 12:25:04 -07:00
2017-05-16 14:21:52 -07:00
2017-05-23 12:07:39 -07:00
2017-01-02 20:57:42 +05:30
2017-05-23 12:07:39 -07:00
2017-02-09 15:20:54 -08:00
2017-06-14 17:27:49 -07:00
2016-09-16 16:44:44 -07:00
2017-06-14 17:27:49 -07:00
2017-06-21 19:53:09 -07:00
2017-03-31 14:11:27 -07:00
2017-06-21 19:53:09 -07:00
2016-11-15 18:14:23 -08:00
2017-06-21 19:53:09 -07:00
2017-06-21 19:53:09 -07:00
2017-06-21 19:53:09 -07:00
2017-06-21 19:53:09 -07:00
2017-03-31 14:11:27 -07:00
2017-05-04 13:43:54 -07:00
2017-05-04 13:43:54 -07:00
2017-06-01 09:43:20 -07:00
2017-04-11 15:44:27 -07:00
2017-06-12 17:40:28 -07:00
2017-08-03 20:07:22 -07:00
2017-07-12 16:42:14 -07:00
2017-06-01 09:43:20 -07:00
2017-06-01 09:43:20 -07:00
2017-05-09 14:32:24 -07:00
2017-06-01 09:43:20 -07:00
2017-06-01 09:43:20 -07:00
2017-08-04 10:45:57 -07:00
2017-02-01 11:16:17 -08:00
2017-06-01 09:43:20 -07:00
2017-04-24 18:13:46 -07:00
2017-05-14 12:05:51 -07:00
2017-08-04 10:45:57 -07:00
2017-05-14 12:05:51 -07:00
2017-07-05 16:56:10 -07:00
2017-08-04 16:51:20 -07:00
2016-08-18 16:23:42 -07:00
2016-08-18 16:23:42 -07:00
2017-01-18 12:24:34 -08:00
2017-01-18 12:24:34 -08:00
2017-02-03 23:27:50 -08:00
2017-05-02 02:35:27 -07:00
2017-06-12 17:40:28 -07:00
2017-01-18 12:24:34 -08:00
2017-05-02 02:35:27 -07:00
2017-05-02 02:35:27 -07:00
2016-08-18 16:23:42 -07:00
2016-10-27 03:30:52 -07:00
2017-05-02 02:35:27 -07:00
2017-08-04 16:51:20 -07:00
2017-06-01 09:43:20 -07:00
2017-03-13 14:41:13 -07:00
2017-06-21 19:53:09 -07:00
2016-10-07 11:15:55 -07:00
2017-04-11 15:44:27 -07:00
2017-06-17 11:20:12 -07:00
2017-06-17 11:20:12 -07:00
2017-02-07 02:16:29 -08:00
2017-05-16 14:21:52 -07:00
2017-05-16 14:21:52 -07:00
2017-03-18 11:28:41 -07:00
2017-04-24 18:13:46 -07:00
2017-03-18 11:28:41 -07:00
2017-07-18 09:30:46 -07:00
2017-07-18 09:30:46 -07:00
2017-04-11 15:44:27 -07:00
2017-04-20 15:28:29 -07:00
2017-07-18 09:30:46 -07:00
2017-02-24 18:26:56 -08:00
2017-01-02 20:57:42 +05:30
2017-06-20 15:01:13 -07:00
2017-02-24 09:20:40 -08:00
2017-04-11 15:44:27 -07:00
2017-08-03 20:03:37 -07:00
2017-04-15 02:16:49 -07:00
2017-03-02 10:34:37 -08:00
2017-06-16 16:01:41 -07:00
2017-06-27 19:46:58 -07:00
2017-07-12 16:33:21 -07:00
2017-04-11 15:44:27 -07:00
2017-07-12 16:33:21 -07:00
2017-03-18 11:28:41 -07:00
2017-04-11 15:44:27 -07:00
2017-05-15 18:17:02 -07:00
2017-05-15 18:17:02 -07:00
2017-06-21 19:53:09 -07:00
2017-05-15 18:17:02 -07:00
2017-05-15 18:17:02 -07:00
2017-07-07 14:31:42 -07:00
2016-11-13 11:48:02 -08:00
2017-07-07 14:31:42 -07:00
2017-05-16 14:21:52 -07:00
2017-05-16 14:21:52 -07:00
2017-06-02 14:05:51 -07:00
2017-04-11 15:44:27 -07:00
2017-05-16 14:21:52 -07:00
2017-07-18 09:30:46 -07:00
2016-10-10 01:42:32 -07:00
2017-06-21 11:30:34 -07:00
2017-06-01 09:43:20 -07:00
2017-02-01 11:16:17 -08:00
2017-04-11 15:44:27 -07:00
2016-08-18 16:23:42 -07:00
2016-08-18 16:23:42 -07:00
2017-02-03 23:27:50 -08:00
2017-03-03 16:32:04 -08:00
2017-06-24 13:17:28 -07:00
2017-06-24 13:17:28 -07:00
2017-05-31 09:22:00 -07:00
2017-05-31 09:22:00 -07:00
2017-05-31 00:11:06 -07:00
2017-05-31 00:11:06 -07:00
2016-08-18 16:23:42 -07:00
2017-02-19 20:46:06 -08:00
2017-08-03 20:07:22 -07:00
2017-07-24 12:46:37 -07:00
2017-07-24 12:46:37 -07:00
2017-04-11 15:44:27 -07:00
2017-06-21 19:53:09 -07:00
2017-03-18 11:28:41 -07:00
2017-07-07 14:31:42 -07:00
2017-06-12 17:40:28 -07:00
2017-06-14 17:13:02 -07:00
2017-06-14 17:13:02 -07:00
2017-06-14 17:14:27 -07:00
2017-06-01 09:43:20 -07:00
2017-06-21 19:53:09 -07:00
2017-06-21 19:53:09 -07:00
2017-06-02 14:05:51 -07:00
2017-06-21 19:53:09 -07:00
2017-06-01 09:43:20 -07:00
2017-06-21 19:53:09 -07:00
2017-06-01 09:43:20 -07:00
2017-06-21 19:53:09 -07:00
2017-06-14 17:14:27 -07:00
2017-06-21 19:53:09 -07:00
2017-08-03 20:07:22 -07:00