apache / apache/arrow

[C++] S3 stress tests can fail to delete a temporary directory

Open
#37,790 6 comments 0 reactions 0 assignees View on GitHub
Component: C++ Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the enhancement requested

This seems to be causing spurious failures of the stress test, [for example](https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/48073408#L3424):

```
API: DeleteMultipleObjects(bucket=stress, multiObject=true, numberOfObjects=1000)
Time: 14:48:36 UTC 09/19/2023
DeploymentID: e8cea2aa-a72f-4074-90e9-0d3a974514d4
RequestID: 178654398B35E984
RemoteHost: 127.0.0.1
Host: 127.0.0.8:51443
UserAgent: aws-sdk-cpp/1.11.68 Windows/10.0.17763.4252 AMD64 MSVC/1929
Error: file access denied (cmd.StorageErr)
6: internal\logger\logger.go:278:logger.LogIf()
5: cmd\fs-v1-helpers.go:430:cmd.fsDeleteFile()
4: cmd\fs-v1.go:1196:cmd.(*FSObjects).DeleteObject()
3: cmd\fs-v1.go:1142:cmd.(*FSObjects).DeleteObjects()
2: cmd\bucket-handlers.go:592:cmd.objectAPIHandlers.DeleteMultipleObjectsHandler()
1: net\http\server.go:2047:http.HandlerFunc.ServeHTTP()
[FATAL] 2023-09-19 14:47:20.923 WinHttpSyncHttpClient [5648] Failed setting secure crypto protocols with error code: 87
[FATAL] 2023-09-19 14:47:21.524 WinHttpSyncHttpClient [5648] Failed setting secure crypto protocols with error code: 87
C:/projects/arrow/cpp/src/arrow/filesystem/s3fs_test.cc(865): error: Failed
'fs_->DeleteDirContents("stress")' failed with IOError: Got the following 1 errors when deleting objects in S3 bucket 'stress':
- key '1/508': Access Denied.
```

I'm not sure this is actually the issue; [other tests](https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/48073408#L3473) can still pass even if deletion of a temporary directory succeeds:

```
[ RUN ] TestS3FS.DeleteFile
[FATAL] 2023-09-19 14:48:38.075 WinHttpSyncHttpClient [5648] Failed setting secure crypto protocols with error code: 87
[FATAL] 2023-09-19 14:48:38.108 WinHttpSyncHttpClient [5648] Failed setting secure crypto protocols with error code: 87
C:/projects/arrow/cpp/src/arrow/status.cc:155: When trying to delete temporary directory: IOError: Cannot delete directory entry 'C:/Users/appveyor/AppData/Local/Temp/1/s3fs-test-mr25m6xu/.minio.sys': . Detail: [Windows error 145] The directory is not empty.
[ OK ] TestS3FS.DeleteFile (594 ms)
```

### Component(s)

C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.