Comments (6)
I'm guessing it's a race condition. The start event is fired before the progress listener is actually registered. When you call upload the first time, TransferManager creates an UploadCallable, which is submitted to the TransferManager's thread pool in the constructor of UploadMonitor on the next line, which when call
ed is going to fire the start event.
It's counterintuitive to me. I would think the the first upload would in fact see the started event fired, as the progress listener had time to be attached while the fixed thread pool was spinning up the 10 threads, and all subsequent calls to upload would "miss" the started event being fired. But threads seem to behave counterintuitively more often than not, ALIME.
from amazonica.
Thanks for the reply.
Based on your response, it seems like the appropriate thing to do would be to see if this behavior is the same when using pure java. Does that sound right to you? I started going down that road by using the AWS SDK directly, but then didn't want to rewrite all of the nice marshalling/unmarshalling and so on that you've added to amazonica.
My java is a bit weak, so I'd probably spend more time trying to test this than I'd be comfortable with, given the workaround of adding the inc
to pending
works fine when I do it in the body of the let
, and not on the :started
event.
I don't want to impose, but could you (or one of the lovely people following the issues list on amazonica 👋) help me verify this is the behavior in pure java as well? If I know that's the case, I could open a ticket with Amazon and see what they have to say about it. Before I do that I want to make sure this isn't a clojure-specific or amazonica-specific issue.
Thanks for your time,
Devin
from amazonica.
I can't reproduce with the code from your gist. pending is always zero for me, with large or small files. Do you get zero if you remove the :failed case?
from amazonica.
No, locally.
from amazonica.
@mcohen01 I wonder if this is only a race condition on EC2, where the upload times are significantly faster. I will test it from my local machine. By the time I go to add the progress listener, the upload may have already finished?
EDIT: Then again, it seems odd that it only happens for the first upload.
One other question: Did you test from a REPL, or by running lein run
or something?
from amazonica.
I was guessing that the start event is fired before the listener is attached. Maybe making the connection to S3 happens much quicker when you're in EC2 such that this is the case, but not outside AWS. I've been testing in the repl.
from amazonica.
Related Issues (20)
- acm namespace under certificatemanager.clj causes import to fail HOT 1
- SQS send-message with message-attributes HOT 3
- Update README.md Lambda Section
- Old dependencies have known vulnerabilities HOT 1
- How to get the uri of a file saved to aws using put-object?
- Unaccurate :arglists for #'amazonica.aws.simpleemail/send-email HOT 3
- Support for KCL 2 (enhanced fan out)
- How to get the progress in uploading to an s3 bucket? HOT 2
- Route53 list-hosted-zones in China HOT 1
- Details on "Could not determine best method to invoke for download using arguments"
- Kinesis checkpointing does not work correctly when leasing multiple shards
- Kinesis client workers do not gracefully shutdown
- How to start new Kinesis worker at InitialPositionInStream.LATEST? HOT 1
- s3 region error
- Very large transient libraries HOT 2
- get-shard-iterator with AT_TIMESTAMP not working HOT 1
- Kinesis worker doesn't use amazonica credentials mechanism HOT 2
- s3 example from the README throws Execution error (IllegalStateException)
- No release tags since 2015
- update to aws-java-sdk 1.12.638+ to resolve CVE-2024-21634) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazonica.