HDFS-6243: handle task cancelation and add assertion that checkpoint was not accepted