Update insert algorithm, change dirty queue structure