Skip to content

When mcs are exhausted, uniqMcs should return an error#248

Open
zzzzzzzzzy9 wants to merge 1 commit intoopencontainers:mainfrom
zzzzzzzzzy9:mcs
Open

When mcs are exhausted, uniqMcs should return an error#248
zzzzzzzzzy9 wants to merge 1 commit intoopencontainers:mainfrom
zzzzzzzzzy9:mcs

Conversation

@zzzzzzzzzy9
Copy link
Copy Markdown

There should be an exit branch in the infinite loop in the code, and return error should be inside the for loop.
Additionally, when judging the length of mcsList, the delete method of mcs should directly remove the key-value pair instead of setting the key-value pair to false, otherwise the length of mcsList will keep increasing.

Signed-off-by: zzzzzzzzzy9 <zhang.yu58@zte.com.cn>
@zzzzzzzzzy9
Copy link
Copy Markdown
Author

#247
#246

@zzzzzzzzzy9
Copy link
Copy Markdown
Author

Copy link
Copy Markdown
Collaborator

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NACK. You change the public API in an incompatible way, it is not acceptable

@kolyshkin
Copy link
Copy Markdown
Collaborator

NACK. You change the public API in an incompatible way, it is not acceptable

The acceptable way is:

  • add new functions (that additionally can return an error)
  • mark the old ones as deprecated

@rhatdan
Copy link
Copy Markdown
Collaborator

rhatdan commented Mar 27, 2026

@zzzzzzzzzy9 are you still interested in adding a new API?

@kolyshkin
Copy link
Copy Markdown
Collaborator

I guess we should come up with the new API and deprecate the old one; then remove the old one ~1 year later.

@rhatdan
Copy link
Copy Markdown
Collaborator

rhatdan commented Apr 24, 2026

Needs a rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants