Prepare to publish snapshots
Test for aggregate inside optimize block