scalableminds / play-mongev

An evolution plugin for playframework 2 applications using MongoDB
MIT License
19 stars 13 forks source link

Re-do mongo CLI execution so it does not use temp files to execute cmds #10

Closed TimGebhardt closed 5 years ago

TimGebhardt commented 6 years ago

We were seeing periodic errors running migrations where the mongo CLI was returning exit code 253. This is an exit code indicating that it couldn't parse the script file in some way or another.

The tricky thing was that the migrations didn't always fail on the same migration. I suspected that this had to do with some file lock or buffered write ephemeral-ness that was causing these periodic failures.

The mongo CLI supports providing the mongo commands via standard input without having to write the commands to a temp file at all. This is the crux of this PR.

TimGebhardt commented 6 years ago

@.ProjectMaintainer or @.reviewer: if you choose to merge this PR note that I branched off of the 0.3.2 tag because the project I'm targetting is on Play 2.3. If possible can you make sure to build a 0.3.x package along that same dependency tree?

TimGebhardt commented 6 years ago

@tmbo thoughts? Not sure what the next steps might be.

tmbo commented 5 years ago

Sorry, did not notice this PR - if you still would like to get this merged, please let me know.