Added endpoint to flush the wal. It is tested using rotate function on document level.