Commiting before switching to a memory based log