Spring Batch read/write count does not match with the actual number of records executed -


Using quartz scheduler and running spring batches. The number of threads is 5 and the shorter interval is 20. If there are 100 records to be taken by the batch and when this is going on, then I stop the execution of the batch .. The number of reading and the counting of the BATCH_STEP_EXECUTION table says' n '.. But there are records of BATCH_STEP_EXECUTION_CONTEXT' Count N '+/-, but this is not the same. Usually these tables There is a mismatch between It is also seen that sometimes the number of recorded records is high but in these tables the number of counts is very low .. no one can explain ..

We really need to see your configuration ItemReader S, you use a simple perspective, to provide accurate answers These two tables serve two different objectives. May include, so that there is a different number.

BATCH_STEP_EXECUTION Store Metadata for Phase Normally The steps given in the reading count will be the actual number of read items during execution.

BATCH_STEP_EXECUTION_CONTEXT stores state information directly from ItemReader , etc. Because of this, the value of the restart can be different from the number actually read (when it stops, makes borders, etc.).


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -