Yicong-Huang opened a new issue, #4731:
URL: https://github.com/apache/texera/issues/4731

   ### What happened?
   
   
`amber/src/main/scala/org/apache/texera/amber/engine/architecture/deploysemantics/deploystrategy/OneOnEach.scala::OneOnEach.initialize`
 replaces `available` but leaves `index` at its prior value. A reused instance 
re-initialized with a new array continues counting from the prior position and 
may report the new array as exhausted before any element is returned.
   
   ### How to reproduce?
   
   ```scala
   val s = OneOnEach()
   s.initialize(Array(nodeA, nodeB)); s.next(); s.next()  // index = 2
   s.initialize(Array(nodeC))                              // index NOT reset
   s.next()  // throws IndexOutOfBoundsException — new array has 1 element but 
index already 2
   ```
   
   ### Version
   
   1.1.0-incubating (Pre-release/Master)


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to