patch for issue: 291,289,279,255. YG
fix keyError for insertdatatier and add a new config. YG
move commit right after insertdatatier and rollback in finally. YG
Merge pull request #294 from yuyiguo/HG1401-patch2-24

patch for issue: 291,289,279,255. YG