Ranjeeth,
In answer to your direct question, if you are talking about what happens when you provision a virtual database with the masking dropdown set to run a masking job on provision, then the VDB is created first of all and once created the masking job is run against it. If the masking job fails then the VDB is rolled back and not provisioned. Your underlying concern of course is that both clear and masked data resides on the file system and Delphix provides a neat and efficient way of potentially rewinding to the unmasked data state. This was pointed out a long time ago by some of our discerning banking customers.
As Hims points out, Delphix invested a lot of engineering time in creating a solution that would allow you to provision only masked blocks of data outside of the production zone. This is achieved by replicating the masked VDB to a second engine in a non-production zone. Our Selective Data Distribution provides a very effective way of zoning the data ensuring clear and masked data separation. This allows us to meet PCI compliance and other data protection regulations.
In fact, if you choose to subset your data within a masking job (removing data is an effective security measure and a required one in most security scenarios), then these blocks are also prevented from being replicated.
The Selective Data Distribution documentation is available
here.
I hope that helps.
Regards,
Gary