Merge MAX_STACK_SIZE and pagination size into one variable
Imagine the following scenario, for simplicity in this example, we set the pagination size to "3". We have 10 pipelines. Pipelines 1, 4 and 5 should not be deleted because they still have parent pipelines. With the new code the following happens: 1. Iterator gets Pipelines 1,2,3 and marks them for deletion. We now have seen 3 pipelines, and thus go into the deletion procedure. 2. Pipeline 1 is undeletable and gets marked. Pipeline 2 and 3 are deleted, the pagination is reset to page 1. 3. Iterator gets Pipelines 1,4,5. 4 and 5 are marked for deletion, as one is unremovable. We now have seen 6 pipelines => deletion 3. Pipeline 4 and 5 are also unremovable, but pagination is reset to page 1. 4. Iterator gets Pipelines 1,4,5. All are unremovable, we move to page 2. Iterator gets 6,7,8, marks those for deletion. 4. Pipelines 6,7,8 are deleted. The pagination is reset to page 2. 5. Iterator gets Pipelines 9,10, marked for deletion. The loop exits and the remaining pipelines on the stack are marked for deletion.
Loading
Please register or sign in to comment