We are all familiar with batch class in SFDC. This post is all about to discuss a known issue in batch class and what is workaround for that? As we know batch class is is required when we are dealing with large number of records and total number of batch job will be decided based on scope parameter (defined while calling a batch class) and total number of records. Say total number of records = 100 Scope parameter = 5. Database.executeBatch(new batchclass(),5); Then batch job will be 20 which means each job will process 5 records. We can see how many jobs are pending and how many jobs completed in set up-->apex jobs. While one batch is in progress we invoke same batch class another time having batch size 5 and total number of records 50. Ideally number jobs should be 10 but actually it will be 10 + number of progressing job of previous batch. Which causes data redundancy that means same records will be processed two times in both the batch.This is the known issue...
A place where you have to land for exploring Salesforce