cmccabe commented on pull request #10366:
URL: https://github.com/apache/kafka/pull/10366#issuecomment-812667473


   > Returning an iterator of batches works well when the control managers only 
have a single iterable thing that needs to be translated to records. Do you 
think we might have cases (eventually) where the control classes have more 
complex state? It might be more flexible to take a consumer rather than return 
an iterable:
   
   Hmm... I don't think that would be a problem.  You could have a single 
iterator that iterates over multiple data structures X and Y.  You would just 
need to store the state of whether you were done with X before starting Y.
   
   In general one of the goals of controller snapshots is to avoid "stopping 
the world" while the snapshot is generated.  So a synchronous API would not be 
useful here.  The iterator API allows us to take only a few batches of records 
at a time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to