added first half to keep trigger generations.

This patch enables to manage replica generation. But it still not
has a function to remove old triggers data.