Add filter functionality for preprocess in insert()
Fix purge_local
Revert the commit 922dc9f7e