title: Spring batch understanding chunk processing
body: <p>I have total 8 records in table, from which 6 are eligible for jpareader when spring batch calls read. Now I have page size and chunk size set to 1 for testing. Expecting that when job runs, it should make 6 read calls, and then it should process them one by one and write them one by one. But actually what happens is it just calls read 4 times (from logs I can see reading page 0...1 like that) and processes 4 from which one is filtered out because doesnt match criteria for writing and then it just updates 3 records and job is marked completed successfully.</p>
  
  <p>Like this job needs to be run 3 times in order to process all records. Something is not clear to us. Tried to understand chunk processing but I think chunk is only to aggregate result to make write call..after that I expect read and process should continue.</p>
  
  <p>With this test, we are confused on what to set for chunk size for production, if we set to large number it will require more memory (heap).</p>