KarmaGYZ opened a new pull request #14560: URL: https://github.com/apache/flink/pull/14560
## What is the purpose of the change Refactor dynamic SlotID. In FLINK-14189, we specified that the SlotID whose slot number is -1 represents the dynamic slot. However, the SlotID with a negative slot number will be treated as invalid in other components, e.g. SlotPool and SlotManager. We have to remove a lot of sanity checks with this change, which is error-prone. The evidence is that there are still some sanity checks that have not been removed, e.g. sanity checks in AllocatedSlotInfo. In this PR, we refactor the dynamic SlotID: - In SlotManager, it still uses -1 as slot number when allocating dynamic slot. - In TM, when allocating dynamic slots, it will asssign an increasing number larger than the numberSlots as the slot number. ## Verifying this change This change is already covered by existing tests: - TaskExecutorTest - TaskSlotTableImplTest ---------------------------------------------------------------- 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