add: history lock for new routine.

Signed-off-by: liuyanghejerry <liuyanghejerry@126.com>