avoid flow number oscilation by deleting and writing flow stats in single commit tx