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
Problem: dynamodb-local may fail to download the dependencies of the jar (in DynamoDBLocal_lib) or the Node.js process may exit before the jar download is finished (or the https download may fail before it finishes), e.g. if there is a unit test timeout and the process exits before everything finish.
The fact that this is using pipe() to reduce memory usage (instead of waiting for the full download) makes it more likely that a folder will be created with incompletely extracted contents, though the bug could happen even without pipe (e.g. slow disk writes)
On slow internet connections or when a computer is under high load, this error can be more frequent.
Proposed solution
Create a unique stub file with an arbitrary unique name such as dynamodb-local-downloaded-successfully.txt before calling deferred.resolve() on success
Check that both the jar file and dynamodb-local-downloaded-successfully.txt exist before returning early.
(The first time libraries/applications using dynamodb-local update to a library version with this, they'll redownload dynamodb-local, but that should be fine)
Problem: dynamodb-local may fail to download the dependencies of the jar (in DynamoDBLocal_lib) or the Node.js process may exit before the jar download is finished (or the https download may fail before it finishes), e.g. if there is a unit test timeout and the process exits before everything finish.
The fact that this is using pipe() to reduce memory usage (instead of waiting for the full download) makes it more likely that a folder will be created with incompletely extracted contents, though the bug could happen even without pipe (e.g. slow disk writes)
On slow internet connections or when a computer is under high load, this error can be more frequent.
Proposed solution
dynamodb-local-downloaded-successfully.txt
before calling deferred.resolve() on successdynamodb-local-downloaded-successfully.txt
exist before returning early.(The first time libraries/applications using dynamodb-local update to a library version with this, they'll redownload dynamodb-local, but that should be fine)
Relevant parts of the code
dynamodb-local/index.js
Line 134 in b180b19
dynamodb-local/index.js
Lines 167 to 172 in b180b19
Related to #38 and #30
The text was updated successfully, but these errors were encountered: