Skip to content

Conversation

@rentzso
Copy link
Contributor

@rentzso rentzso commented Jan 28, 2016

This change enables a new route api/engine to handle uploads of multiple files with metadata.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this function is called several times without error handling.
If mongo throws an exception halfway through, will the result be a partial update? How bad is that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's simply bad.
We would need a general "transaction" for multiple mongo operations as the reaper endpoint also applies multiple updates serially.

WIredTiger, a new mongo storage engine (default in 3.2) seems to provide a transaction system, http://source.wiredtiger.com/2.4.1/transactions.html

However I think that this issue is not in the scope of this PR, but we should definitely address it sooner than later. We should explore if WiredTiger is the way to go or if a home baked system would be better in term of flexibility/optimization vs development/maintenance time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair. Let's leave it for now.

@kofalt
Copy link
Contributor

kofalt commented Jan 28, 2016

LGTM pending a small question!

kofalt added a commit that referenced this pull request Jan 28, 2016
@kofalt kofalt merged commit 3adc050 into master Jan 28, 2016
@kofalt kofalt deleted the multiple_files_upload branch January 28, 2016 20:32
@kofalt kofalt added this to the Bali milestone Jan 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants