update mapreduce state even on completion and failure