mongoimport: trap SIGUSR1 to flush buffer
If mongoimport is run in the background as a daemon, the user doesn't have many good ways to manually flush the buffer from a scripting standpoint. By default mongoimport flushed data every 1000 documents.
This feature as already requested at https://jira.mongodb.org/browse/TOOLS-2773 but was closed. I still have the hope that it will be introduced somewhere in future release.
1
vote
![](https://secure.gravatar.com/avatar/d1b2da4d09566b6a9d1fcfaeb15d4acb?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)