You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using code similar to the S3 upload example, chunked_stream_reader.dart throws 'Concurrent read operations are not allowed!'
This is caused by 2 processes trying to read from the file stream at the same time.
Potential issue identified tracing through s3_upload_task.dart:
_startNextUploadPartsBatch starts up to 4 chunk readers sequentially. Each of these starts a synchronous process to send the chunk to S3. As the uploads finish they trigger another call to _startNextUploadPartsBatch which waits for the first batch to finish. If more than 1 upload process finishes before the first batch finishes we can end up with 2 new _startNextUploadPartsBatch both waiting for the first batch to finish. When that first batch does finish, the 2 new _startNextUploadPartsBatch both start trying to read the file stream resulting in concurrent read attempts.
Categories
Analytics
API (REST)
API (GraphQL)
Auth
Authenticator
DataStore
Notifications (Push)
Storage
Steps to Reproduce
Using example S3 upload code, upload file greater than 20Mb (4 chunks * 5Mb max chunk)
Screenshots
No response
Platforms
iOS
Android
Web
macOS
Windows
Linux
Flutter Version
3.24.4
Amplify Flutter Version
2.5.0
Deployment Method
Amplify Gen 2
Schema
No response
The text was updated successfully, but these errors were encountered:
tyllark
added
bug
Something is not working; the issue has reproducible steps and has been reproduced
and removed
to-be-reproduced
Issues that have not been reproduced yet, but have reproduction steps provided
labels
Nov 19, 2024
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
Description
Using code similar to the S3 upload example, chunked_stream_reader.dart throws 'Concurrent read operations are not allowed!'
This is caused by 2 processes trying to read from the file stream at the same time.
Potential issue identified tracing through s3_upload_task.dart:
_startNextUploadPartsBatch starts up to 4 chunk readers sequentially. Each of these starts a synchronous process to send the chunk to S3. As the uploads finish they trigger another call to _startNextUploadPartsBatch which waits for the first batch to finish. If more than 1 upload process finishes before the first batch finishes we can end up with 2 new _startNextUploadPartsBatch both waiting for the first batch to finish. When that first batch does finish, the 2 new _startNextUploadPartsBatch both start trying to read the file stream resulting in concurrent read attempts.
Categories
Steps to Reproduce
Using example S3 upload code, upload file greater than 20Mb (4 chunks * 5Mb max chunk)
Screenshots
No response
Platforms
Flutter Version
3.24.4
Amplify Flutter Version
2.5.0
Deployment Method
Amplify Gen 2
Schema
No response
The text was updated successfully, but these errors were encountered: